summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-01-29 12:53:24 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-01-29 12:53:24 +0000
commit62acbb9805be958a784d9e7cea97be90239aefc4 (patch)
treeaeba62b53bc326f9857271efe21866fa370f3d9f
parent1997f7807bfea7710bc6d5bcabb39ad9ba59769c (diff)
test for immature statement
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57456 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--test/irb/test_ruby-lex.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/irb/test_ruby-lex.rb b/test/irb/test_ruby-lex.rb
index ba6774544ed..79528676e49 100644
--- a/test/irb/test_ruby-lex.rb
+++ b/test/irb/test_ruby-lex.rb
@@ -35,6 +35,11 @@ module TestIRB
result)
end
+ def test_immature_statement
+ src = "if false\n"
+ assert_equal([[src, 1]], top_level_statement(src))
+ end
+
def top_level_statement(lines)
input = InputLines.new(lines, "r")
scanned = []