summaryrefslogtreecommitdiff
path: root/test/ruby
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby')
-rw-r--r--test/ruby/test_process.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/ruby/test_process.rb b/test/ruby/test_process.rb
index 9fc9f0c603..4d88be5843 100644
--- a/test/ruby/test_process.rb
+++ b/test/ruby/test_process.rb
@@ -236,6 +236,17 @@ class TestProcess < Test::Unit::TestCase
system({"F=O"=>"BAR"}, *TRUECOMMAND)
}
+ with_tmpchdir {|d|
+ prog = "#{d}/notexist"
+ e = assert_raise(Errno::ENOENT) {
+ Process.wait Process.spawn({"FOO"=>"BAR"}, prog)
+ }
+ assert_equal(prog, e.message.sub(/.* - /, ''))
+ e = assert_raise(Errno::ENOENT) {
+ Process.wait Process.spawn({"FOO"=>"BAR"}, [prog, "blar"])
+ }
+ assert_equal(prog, e.message.sub(/.* - /, ''))
+ }
h = {}
cmd = [h, RUBY]
(ENV.keys + MANDATORY_ENVS).each do |k|