summaryrefslogtreecommitdiff
path: root/test/test_open3.rb
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
commit3266ec1658e77c0cfcdd5d56cf1ccdab90482150 (patch)
treec546c4021a6b80f94a32fe3fb864df723c33b9aa /test/test_open3.rb
parentb314ab3e4406ff8f9ceb7dd60b5b1a302f02e6ef (diff)
* lib/open3.rb (Open3.pipeline_start): return an array of threads if a
block is not given. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20618 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/test_open3.rb')
-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 d891eed..8f355cc 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'