summaryrefslogtreecommitdiff
path: root/test/ruby
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2024-04-04 18:22:27 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2024-04-04 18:54:54 +0900
commit184db1fd6ab04cff2721c1e634e6ff31519fcd28 (patch)
treebd17a02d29260e7b4446bdea50858daba938c9f5 /test/ruby
parent64b0f4303e3551ca044e29100ace7927607a07e3 (diff)
Update `ARGF.write` interface
Diffstat (limited to 'test/ruby')
-rw-r--r--test/ruby/test_argf.rb4
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