summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-04-22 19:11:28 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-04-22 19:11:28 +0000
commit2dc5fdec0130e1b6d553a843d266b53e62efe836 (patch)
treee2a3a6cdc2549c2ca9b00e2b6f9a68a3279dc4bf
parentb6847f7acca72b135ad00793c4706df2058d1ed8 (diff)
* test/ripper/test_parser_events.rb (test_unterminated_regexp):
separate test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27450 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--test/ripper/test_parser_events.rb10
2 files changed, 14 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 6d60b2dc71..dab135106e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Fri Apr 23 04:11:26 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * test/ripper/test_parser_events.rb (test_unterminated_regexp):
+ separate test.
+
Fri Apr 23 01:47:54 2010 NAKAMURA Usaku <usa@ruby-lang.org>
* win32/win32.c (rb_w32_wopen): shouldn't use FILE_FLAG_OVERLAPPED with
diff --git a/test/ripper/test_parser_events.rb b/test/ripper/test_parser_events.rb
index c07fc4a01e..527c29023f 100644
--- a/test/ripper/test_parser_events.rb
+++ b/test/ripper/test_parser_events.rb
@@ -154,7 +154,7 @@ class TestRipper::ParserEvents < Test::Unit::TestCase
def test_operator_ambiguous
thru_operator_ambiguous = false
- parse('a=1; a //', :on_operator_ambiguous) {thru_operator_ambiguous = true}
+ parse('a=1; a %[]', :on_operator_ambiguous) {thru_operator_ambiguous = true}
assert_equal true, thru_operator_ambiguous
end
@@ -1088,4 +1088,12 @@ class TestRipper::ParserEvents < Test::Unit::TestCase
["[fcall(proc,[],&block([],[void()]))]"], [], '[ruby-dev:39423]')
end
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
+ end
end if ripper_test