diff options
-rw-r--r-- | test/test_open3.rb | 7 |
1 files changed, 7 insertions, 0 deletions
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 |