test_parser_events.rb: backref_assign_error
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60106 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
1ef2ca5a96
commit
7f6e18fad0
@ -199,11 +199,16 @@ class TestRipper::ParserEvents < Test::Unit::TestCase
|
|||||||
|
|
||||||
def test_assign_error_backref
|
def test_assign_error_backref
|
||||||
thru_assign_error = false
|
thru_assign_error = false
|
||||||
|
result =
|
||||||
parse('$` = 1', :on_assign_error) {thru_assign_error = true}
|
parse('$` = 1', :on_assign_error) {thru_assign_error = true}
|
||||||
assert_equal true, thru_assign_error
|
assert_equal true, thru_assign_error
|
||||||
|
assert_equal '[assign(assign_error(var_field($`)),1)]', result
|
||||||
|
|
||||||
thru_assign_error = false
|
thru_assign_error = false
|
||||||
|
result =
|
||||||
parse('$`, _ = 1', :on_assign_error) {thru_assign_error = true}
|
parse('$`, _ = 1', :on_assign_error) {thru_assign_error = true}
|
||||||
assert_equal true, thru_assign_error
|
assert_equal true, thru_assign_error
|
||||||
|
assert_equal '[massign([assign_error(var_field($`)),_],1)]', result
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_assign_error_const_qualified
|
def test_assign_error_const_qualified
|
||||||
|
Loading…
x
Reference in New Issue
Block a user