summaryrefslogtreecommitdiff
path: root/test/ripper
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-04-26 04:11:59 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-04-26 04:11:59 +0000
commitb0018f68590c8071bb0a242f75cc4fa048396e78 (patch)
tree1d62b82c11ddb9ab3ed6ecae81292028f2b3fe2d /test/ripper
parent3cbb849bbbf6088be2c054ee89a6b47f0e39ae99 (diff)
* parse.y (ripper_get_value): escape Qundef.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27499 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ripper')
-rw-r--r--test/ripper/test_parser_events.rb9
1 files changed, 4 insertions, 5 deletions
diff --git a/test/ripper/test_parser_events.rb b/test/ripper/test_parser_events.rb
index 02183129b0..2ac623f76d 100644
--- a/test/ripper/test_parser_events.rb
+++ b/test/ripper/test_parser_events.rb
@@ -463,6 +463,7 @@ class TestRipper::ParserEvents < Test::Unit::TestCase
thru_def = true
}
assert_equal true, thru_def
+ assert_equal '[def(foo,[],bodystmt([void()]))]', parse('def foo ;end')
end
def test_defined
@@ -1102,10 +1103,8 @@ class TestRipper::ParserEvents < Test::Unit::TestCase
end
def test_unterminated_regexp
- assert_normal_exit(<<"SRC")
-$:.unshift(File.dirname(#{File.expand_path(__FILE__).dump}))
-require 'dummyparser'
-DummyParser.new('/').parse.to_s
-SRC
+ compile_error = false
+ parse('/', :compile_error) {|msg| compile_error = msg}
+ assert_equal("unterminated regexp meets end of file", compile_error)
end
end if ripper_test