diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-09-27 14:19:32 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-09-27 14:19:32 +0000 |
commit | 0e547e6392581acac939fdfba6b730e0480c5fd6 (patch) | |
tree | b89cb21f9bfa4d475c5f714573b65c7bbe7c8752 /test | |
parent | e9fa549539d80ca6d1627ad49bbeb900e6e6aac5 (diff) | |
download | ruby-0e547e6392581acac939fdfba6b730e0480c5fd6.tar.gz |
test_syntax.rb: more test_warn_balanced
* test/ruby/test_syntax.rb (test_warn_balanced): more assertions
for a symbol literal and a local variable.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56272 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_syntax.rb | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/test/ruby/test_syntax.rb b/test/ruby/test_syntax.rb index fcec8c955c..b026c21a4c 100644 --- a/test/ruby/test_syntax.rb +++ b/test/ruby/test_syntax.rb @@ -311,8 +311,14 @@ WARN [:/, "regexp literal"], [:%, "string literal"], ].each do |op, syn| - assert_warning(warning % [op, syn]) do - assert_valid_syntax("puts 1 #{op}0", "test", verbose: true) + all_assertions do |a| + ["puts 1 #{op}0", "puts :a #{op}0", "m = 1; puts m #{op}0"].each do |src| + a.for(src) do + assert_warning(warning % [op, syn], src) do + assert_valid_syntax(src, "test", verbose: true) + end + end + end end end end |