diff options
| author | Kevin Newton <kddnewton@gmail.com> | 2024-05-20 10:00:53 -0400 |
|---|---|---|
| committer | Kevin Newton <kddnewton@gmail.com> | 2024-05-20 10:49:41 -0400 |
| commit | 785fba3b161bc0a54e2fc9c5447526499ef93a74 (patch) | |
| tree | 7c4a16c2871d24287cbb6570819a4dcc7a6a47bf /test/ruby | |
| parent | 2e8ae139748f137a1585b5f464e505ac479a1332 (diff) | |
[PRISM] Enable TestSyntax#test_warn_balanced
Diffstat (limited to 'test/ruby')
| -rw-r--r-- | test/ruby/test_syntax.rb | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/test/ruby/test_syntax.rb b/test/ruby/test_syntax.rb index 56b97789e5..2f311c859e 100644 --- a/test/ruby/test_syntax.rb +++ b/test/ruby/test_syntax.rb @@ -506,10 +506,6 @@ class TestSyntax < Test::Unit::TestCase end def test_warn_balanced - warning = <<WARN -test:1: warning: '%s' after local variable or literal is interpreted as binary operator -test:1: warning: even though it seems like %s -WARN [ [:**, "argument prefix"], [:*, "argument prefix"], @@ -523,7 +519,9 @@ WARN 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 + warning = /'#{Regexp.escape(op)}' after local variable or literal is interpreted as binary operator.+?even though it seems like #{syn}/m + + assert_warning(warning, src) do assert_valid_syntax(src, "test", verbose: true) end end |
