summaryrefslogtreecommitdiff
path: root/test/ruby/test_syntax.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby/test_syntax.rb')
-rw-r--r--test/ruby/test_syntax.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/ruby/test_syntax.rb b/test/ruby/test_syntax.rb
index 5c1bd8fc16..c28bc80bc0 100644
--- a/test/ruby/test_syntax.rb
+++ b/test/ruby/test_syntax.rb
@@ -1142,6 +1142,12 @@ eom
end;
end
+ def test_syntax_error_at_newline
+ expected = "\n ^"
+ assert_syntax_error("%[abcdef", expected)
+ assert_syntax_error("%[abcdef\n", expected)
+ end
+
def test_invalid_jump
assert_in_out_err(%w[-e redo], "", [], /^-e:1: /)
end