From e0c3f58102ccbd8d7955410f81c7f12723b6307f Mon Sep 17 00:00:00 2001 From: headius Date: Tue, 2 Dec 2014 22:08:05 +0000 Subject: * 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 --- test/test_open3.rb | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'test') diff --git a/test/test_open3.rb b/test/test_open3.rb index 46a991da2d..e560fbedb4 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 -- cgit v1.2.3