mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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
This commit is contained in:
parent
d255074008
commit
e0c3f58102
1 changed files with 7 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue