diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-06-06 11:09:26 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-06-06 11:09:26 +0000 |
commit | 7685837427e60770d7228cc1d3db97257521a606 (patch) | |
tree | 96d3b34eda6346f72c69eaf90d5c5ae86f4e0990 /test | |
parent | 96b96832c13b1ef127262cec1104bc7cb7524b69 (diff) | |
download | ruby-7685837427e60770d7228cc1d3db97257521a606.tar.gz |
* process.c (try_with_sh): take envp argument.
(exec_with_sh): ditto. use it for execve.
(proc_exec_v): provide envp for try_with_sh.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35943 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_process.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/ruby/test_process.rb b/test/ruby/test_process.rb index 32d5aee62d..d8f127eab7 100644 --- a/test/ruby/test_process.rb +++ b/test/ruby/test_process.rb @@ -1297,6 +1297,11 @@ class TestProcess < Test::Unit::TestCase open("tmp_script.#{$$}", "w") {|f| f.puts "echo $#: $@"; f.chmod(0755)} result = IO.popen(["./tmp_script.#{$$}", "a b", "c"]) {|f| f.read} assert_equal("2: a b c\n", result, feature) + + open("tmp_script.#{$$}", "w") {|f| f.puts "echo $hghg"; f.chmod(0755)} + result = IO.popen([{"hghg" => "mogomogo"}, "./tmp_script.#{$$}", "a b", "c"]) {|f| f.read} + assert_equal("mogomogo\n", result, feature) + end end if File.executable?("/bin/sh") |