aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-10-03 07:51:37 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-10-03 07:51:37 +0000
commit087f8b011122b616742da4bc2847cd92cf81f10c (patch)
treec0a86537dd5992b2c5f901a3461827d91d251265
parent7307b281bb1a0d8fea9159a270ece1c8383e2d72 (diff)
downloadruby-087f8b011122b616742da4bc2847cd92cf81f10c.tar.gz
test_parser_events.rb: backref_assign_error
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60106 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--test/ripper/test_parser_events.rb9
1 files changed, 7 insertions, 2 deletions
diff --git a/test/ripper/test_parser_events.rb b/test/ripper/test_parser_events.rb
index 03580107a0..ccebe2dbb7 100644
--- a/test/ripper/test_parser_events.rb
+++ b/test/ripper/test_parser_events.rb
@@ -199,11 +199,16 @@ class TestRipper::ParserEvents < Test::Unit::TestCase
def test_assign_error_backref
thru_assign_error = false
- parse('$` = 1', :on_assign_error) {thru_assign_error = true}
+ result =
+ parse('$` = 1', :on_assign_error) {thru_assign_error = true}
assert_equal true, thru_assign_error
+ assert_equal '[assign(assign_error(var_field($`)),1)]', result
+
thru_assign_error = false
- parse('$`, _ = 1', :on_assign_error) {thru_assign_error = true}
+ result =
+ parse('$`, _ = 1', :on_assign_error) {thru_assign_error = true}
assert_equal true, thru_assign_error
+ assert_equal '[massign([assign_error(var_field($`)),_],1)]', result
end
def test_assign_error_const_qualified