mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
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
This commit is contained in:
parent
7d24c27d21
commit
9940a8d181
1 changed files with 4 additions and 0 deletions
|
@ -2357,6 +2357,10 @@ End
|
||||||
IO.foreach("|" + EnvUtil.rubybin + " -e 'puts :foo; puts :bar; puts :baz'") {|x| a << x }
|
IO.foreach("|" + EnvUtil.rubybin + " -e 'puts :foo; puts :bar; puts :baz'") {|x| a << x }
|
||||||
assert_equal(["foo\n", "bar\n", "baz\n"], a)
|
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|
|
make_tempfile {|t|
|
||||||
a = []
|
a = []
|
||||||
IO.foreach(t.path) {|x| a << x }
|
IO.foreach(t.path) {|x| a << x }
|
||||||
|
|
Loading…
Reference in a new issue