diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-11-06 00:58:49 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-11-06 00:58:49 +0000 |
commit | 4b7fd61a05aff71d5044f985ac3c7924bed9e403 (patch) | |
tree | 95ee5f29aa66e47ce671cbbc8fc32b53419af37d /test/ruby | |
parent | 840d23cb080c3f2d33dafe8de7f7feb04b0e0739 (diff) |
process.c: PATH env in spawn
* process.c (rb_exec_fillarg): honor the given path environment
variable. [ruby-core:53103] [Bug #8004]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56618 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby')
-rw-r--r-- | test/ruby/test_process.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/ruby/test_process.rb b/test/ruby/test_process.rb index 812af7a615..3921395466 100644 --- a/test/ruby/test_process.rb +++ b/test/ruby/test_process.rb @@ -316,6 +316,16 @@ class TestProcess < Test::Unit::TestCase end end + def test_execopt_env_path + bug8004 = '[ruby-core:53103] [Bug #8004]' + Dir.mktmpdir do |d| + open("#{d}/tmp_script.cmd", "w") {|f| f.puts ": ;"; f.chmod(0755)} + assert_not_nil(pid = Process.spawn({"PATH" => d}, "tmp_script.cmd"), bug8004) + wpid, st = Process.waitpid2(pid) + assert_equal([pid, true], [wpid, st.success?], bug8004) + end + end + def _test_execopts_env_popen(cmd) message = cmd.inspect IO.popen({"FOO"=>"BAR"}, cmd) {|io| |