diff options
-rw-r--r-- | test/ruby/test_rubyoptions.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/ruby/test_rubyoptions.rb b/test/ruby/test_rubyoptions.rb index 38ca119a8f..99af480f35 100644 --- a/test/ruby/test_rubyoptions.rb +++ b/test/ruby/test_rubyoptions.rb @@ -578,6 +578,15 @@ class TestRubyOptions < Test::Unit::TestCase feature4299 = '[ruby-dev:43083]' assert_in_out_err(["-w", t.path], "", [], err, feature4299) assert_in_out_err(["-wr", t.path, "-e", ""], "", [], err, feature4299) + + t.rewind + t.truncate(0) + t.puts "if a = __LINE__; end" + t.flush + err = ["#{t.path}:1:#{warning}", + ] + assert_in_out_err(["-w", t.path], "", [], err) + assert_in_out_err(["-wr", t.path, "-e", ""], "", [], err) } end |