aboutsummaryrefslogtreecommitdiffstats
path: root/test/ripper/test_parser_events.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/ripper/test_parser_events.rb')
-rw-r--r--test/ripper/test_parser_events.rb12
1 files changed, 8 insertions, 4 deletions
diff --git a/test/ripper/test_parser_events.rb b/test/ripper/test_parser_events.rb
index cf118a49c2..86720b1446 100644
--- a/test/ripper/test_parser_events.rb
+++ b/test/ripper/test_parser_events.rb
@@ -1014,20 +1014,23 @@ class TestRipper::ParserEvents < Test::Unit::TestCase
def test_qwords_add
thru_qwords_add = false
- parse('%w[a]', :on_qwords_add) {thru_qwords_add = true}
+ tree = parse('%w[a]', :on_qwords_add) {thru_qwords_add = true}
assert_equal true, thru_qwords_add
+ assert_equal '[array([a])]', tree
end
def test_qsymbols_add
thru_qsymbols_add = false
- parse('%i[a]', :on_qsymbols_add) {thru_qsymbols_add = true}
+ tree = parse('%i[a]', :on_qsymbols_add) {thru_qsymbols_add = true}
assert_equal true, thru_qsymbols_add
+ assert_equal '[array([:a])]', tree
end
def test_symbols_add
thru_symbols_add = false
- parse('%I[a]', :on_symbols_add) {thru_symbols_add = true}
+ tree = parse('%I[a]', :on_symbols_add) {thru_symbols_add = true}
assert_equal true, thru_symbols_add
+ assert_equal '[array([:a])]', tree
end
def test_qwords_new
@@ -1377,8 +1380,9 @@ class TestRipper::ParserEvents < Test::Unit::TestCase
def test_words_add
thru_words_add = false
- parse('%W[a]', :on_words_add) {thru_words_add = true}
+ tree = parse('%W[a]', :on_words_add) {thru_words_add = true}
assert_equal true, thru_words_add
+ assert_equal '[array([a])]', tree
end
def test_words_new