aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_open3.rb
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-03-01 10:56:39 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-03-01 10:56:39 +0000
commit14ad015896fb58e7ce2ddb9d829789327ca159d7 (patch)
tree053496d4268d18da8345a81c81cabf58e995a6e0 /test/test_open3.rb
parent44f58afa751e98ec9fe5b89a5a5e71ca474e99cf (diff)
downloadruby-14ad015896fb58e7ce2ddb9d829789327ca159d7.tar.gz
* lib/open3.rb (Open3.capture3): Ignore Errno::EPIPE for writing
stdin_data. (Open3.capture2): Ditto. (Open3.capture2e): Ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45229 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/test_open3.rb')
-rw-r--r--test/test_open3.rb19
1 files changed, 19 insertions, 0 deletions
diff --git a/test/test_open3.rb b/test/test_open3.rb
index 20e91c702a..cd63034f1e 100644
--- a/test/test_open3.rb
+++ b/test/test_open3.rb
@@ -149,6 +149,25 @@ class TestOpen3 < Test::Unit::TestCase
assert(s.success?)
end
+ def test_capture3_stdin_data
+ o, e, s = Open3.capture3(RUBY, '-e', '', :stdin_data=>"z"*(1024*1024))
+ assert_equal("", o)
+ assert_equal("", e)
+ assert(s.success?)
+ end
+
+ def test_capture2_stdin_data
+ o, s = Open3.capture2(RUBY, '-e', '', :stdin_data=>"z"*(1024*1024))
+ assert_equal("", o)
+ assert(s.success?)
+ end
+
+ def test_capture2e_stdin_data
+ oe, s = Open3.capture2e(RUBY, '-e', '', :stdin_data=>"z"*(1024*1024))
+ assert_equal("", oe)
+ assert(s.success?)
+ end
+
def test_pipeline_rw
Open3.pipeline_rw([RUBY, '-e', 'print STDIN.read + "1"'],
[RUBY, '-e', 'print STDIN.read + "2"']) {|i,o,ts|