зеркало из https://github.com/github/ruby.git
* 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:
Родитель
d255074008
Коммит
e0c3f58102
|
@ -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
|
||||
|
|
Загрузка…
Ссылка в новой задаче