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 | 8965f49117efb7ac02cd3e92acba1990d2eedf1a (patch) | |
tree | b89cb21f9bfa4d475c5f714573b65c7bbe7c8752 /test | |
parent | 7c5a5a7cbc6112550106808234a5dc4dd3b1ecdc (diff) | |
download | ruby-8965f49117efb7ac02cd3e92acba1990d2eedf1a.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 |