diff options
Diffstat (limited to 'test/ruby/test_process.rb')
-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| |