diff options
Diffstat (limited to 'test/irb')
-rw-r--r-- | test/irb/test_ruby_lex.rb | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/test/irb/test_ruby_lex.rb b/test/irb/test_ruby_lex.rb index 32463f7fb6..47435d675e 100644 --- a/test/irb/test_ruby_lex.rb +++ b/test/irb/test_ruby_lex.rb @@ -399,6 +399,23 @@ module TestIRB end end + def test_corresponding_syntax_to_keyword_in + input_with_correct_indents = [ + Row.new(%q(module E), nil, 2, 1), + Row.new(%q(end), 0, 0, 0), + Row.new(%q(class A), nil, 2, 1), + Row.new(%q( in), nil, 4, 1) + ] + + lines = [] + input_with_correct_indents.each do |row| + lines << row.content + assert_indenting(lines, row.current_line_spaces, false) + assert_indenting(lines, row.new_line_spaces, true) + assert_nesting_level(lines, row.nesting_level) + end + end + def test_bracket_corresponding_to_times input_with_correct_indents = [ Row.new(%q(3.times { |i|), nil, 2, 1), |