summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-12-10 17:24:42 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-12-10 17:24:42 +0000
commitf1cb0f2f547a0b49b8e919aa84c8f233aec150ae (patch)
treec546c4021a6b80f94a32fe3fb864df723c33b9aa /test
parentfe53e0f85760075aee3db77ba3a63f95172d03e9 (diff)
downloadruby-f1cb0f2f547a0b49b8e919aa84c8f233aec150ae.tar.gz
ruby-f1cb0f2f547a0b49b8e919aa84c8f233aec150ae.tar.xz
ruby-f1cb0f2f547a0b49b8e919aa84c8f233aec150ae.zip
* lib/open3.rb (Open3.pipeline_start): return an array of threads if a
block is not given. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@20618 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r--test/test_open3.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/test_open3.rb b/test/test_open3.rb
index d891eed11..8f355ccb7 100644
--- a/test/test_open3.rb
+++ b/test/test_open3.rb
@@ -214,6 +214,15 @@ class TestOpen3 < Test::Unit::TestCase
}
end
+ def test_pipeline_start_noblock
+ ts = Open3.pipeline_start([RUBY, '-e', ''])
+ assert_kind_of(Array, ts)
+ assert_equal(1, ts.length)
+ ts.each {|t| assert_kind_of(Thread, t) }
+ t = ts[0]
+ assert(t.value.success?)
+ end
+
def test_pipeline
command = [RUBY, '-e', 's=STDIN.read; print s[1..-1]; exit s[0] == ?t']
str = 'ttftff'