diff options
Diffstat (limited to 'test/ruby')
| -rw-r--r-- | test/ruby/test_argf.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/test/ruby/test_argf.rb b/test/ruby/test_argf.rb index 146463a470..55a06296aa 100644 --- a/test/ruby/test_argf.rb +++ b/test/ruby/test_argf.rb @@ -1130,9 +1130,11 @@ class TestArgf < Test::Unit::TestCase def test_puts t = make_tempfile("argf-#{__method__}", 'bar') - ruby('-pi-', '-W0', '-e', "print ARGF.puts('foo')", t.path) do |f| + err = "#{@tmpdir}/errout" + ruby('-pi-', '-W2', '-e', "print ARGF.puts('foo')", t.path, {err: err}) do |f| end assert_equal("foo\nbar\n", File.read(t.path)) + assert_empty File.read(err) end def test_print |
