summaryrefslogtreecommitdiff
path: root/test/ripper/test_parser_events.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/ripper/test_parser_events.rb')
-rw-r--r--test/ripper/test_parser_events.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/ripper/test_parser_events.rb b/test/ripper/test_parser_events.rb
index 95ec661fcf..1f2f960020 100644
--- a/test/ripper/test_parser_events.rb
+++ b/test/ripper/test_parser_events.rb
@@ -1498,4 +1498,10 @@ class TestRipper::ParserEvents < Test::Unit::TestCase
assert_warn("") {fmt, = warn("\r;")}
assert_match(/encountered/, fmt)
end
+
+ def test_warn_mismatched_indentations
+ fmt, tokend, tokbeg, line = assert_warning("") {break warn("if true\n end\n")}
+ assert_match(/mismatched indentations/, fmt)
+ assert_equal(["if", "end", 1], [tokbeg, tokend, line])
+ end
end if ripper_test