From 0e547e6392581acac939fdfba6b730e0480c5fd6 Mon Sep 17 00:00:00 2001 From: nobu Date: Tue, 27 Sep 2016 14:19:32 +0000 Subject: [PATCH] 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 --- test/ruby/test_syntax.rb | 10 ++++++++-- 1 file 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