diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-12-18 04:12:06 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-12-18 04:12:06 +0000 |
commit | b94bb37a9875280bf127f1f42b9291d3e883a532 (patch) | |
tree | b8ad0de7b5e35144cf8959c8024bfbd028858c82 /test | |
parent | e4a4aa1a090f3ec166b24b0a512e945056e8a52d (diff) | |
download | ruby-b94bb37a9875280bf127f1f42b9291d3e883a532.tar.gz |
test/ruby/test_io.rb: test for r61314
From: Nobuyoshi Nakada <nobu@ruby-lang.org>
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61315 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_io.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/test/ruby/test_io.rb b/test/ruby/test_io.rb index 009afc3297..00369365d0 100644 --- a/test/ruby/test_io.rb +++ b/test/ruby/test_io.rb @@ -2357,6 +2357,10 @@ End IO.foreach("|" + EnvUtil.rubybin + " -e 'puts :foo; puts :bar; puts :baz'") {|x| a << x } assert_equal(["foo\n", "bar\n", "baz\n"], a) + a = [] + IO.foreach("|" + EnvUtil.rubybin + " -e 'puts :zot'", :open_args => ["r"]) {|x| a << x } + assert_equal(["zot\n"], a) + make_tempfile {|t| a = [] IO.foreach(t.path) {|x| a << x } |