summaryrefslogtreecommitdiff
path: root/test/test_open3.rb
diff options
context:
space:
mode:
authorheadius <headius@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-12-02 22:08:05 +0000
committerheadius <headius@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-12-02 22:08:05 +0000
commite0c3f58102ccbd8d7955410f81c7f12723b6307f (patch)
tree84dea92740ac7c6aab42050b29c1ba4ad130a18a /test/test_open3.rb
parentd255074008f1953e6e4c028e7ff6394b060dd62f (diff)
* test/test_open3.rb: Add a simple test for env hash on popen3.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48688 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/test_open3.rb')
-rw-r--r--test/test_open3.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/test_open3.rb b/test/test_open3.rb
index 46a991d..e560fbe 100644
--- a/test/test_open3.rb
+++ b/test/test_open3.rb
@@ -73,6 +73,13 @@ class TestOpen3 < Test::Unit::TestCase
}
end
+ def test_env
+ result = Open3.popen3({'A' => 'B', 'C' => 'D'}, RUBY, '-e' 'p ENV["A"]') do |i, out, err, thr|
+ output = out.read
+ assert_equal("\"B\"\n", output)
+ end
+ end
+
def with_pipe
r, w = IO.pipe
yield r, w