diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-05-23 23:16:09 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-05-23 23:16:09 +0000 |
commit | d837ce5eda1f825345160d8847698533dc0980d0 (patch) | |
tree | 157432e024377d129ae27451630ece0d12b5e2a5 /test | |
parent | b4f1eaa4933185797a202e8d0486cfd15fe19457 (diff) | |
download | ruby-d837ce5eda1f825345160d8847698533dc0980d0.tar.gz |
* process.c (rb_f_spawn): use correct command name for the error
message. [ruby-dev:41395]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27985 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_process.rb | 11 |
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| |