diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2024-04-04 18:22:27 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2024-04-04 18:54:54 +0900 |
commit | 184db1fd6ab04cff2721c1e634e6ff31519fcd28 (patch) | |
tree | bd17a02d29260e7b4446bdea50858daba938c9f5 /test/ruby | |
parent | 64b0f4303e3551ca044e29100ace7927607a07e3 (diff) |
Update `ARGF.write` interface
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 |