summaryrefslogtreecommitdiff
path: root/test/ruby/test_process.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-09-07 14:45:31 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-09-07 14:45:31 +0000
commitbe3de529c24ae4d12c030f915d4d4914e2d5ceb5 (patch)
tree6deb0340d3535db63e9feeeda963701320f046f7 /test/ruby/test_process.rb
parent06cac6d6990bb481fa4cfeee4fb64a84cc85de8e (diff)
process.c: chdir exception message
* process.c (rb_exec_fail): raise with the target directory name when chdir() failed. pointed out by sorah. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51786 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_process.rb')
-rw-r--r--test/ruby/test_process.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/test/ruby/test_process.rb b/test/ruby/test_process.rb
index 60a1c233cb..cd649053c0 100644
--- a/test/ruby/test_process.rb
+++ b/test/ruby/test_process.rb
@@ -404,9 +404,13 @@ class TestProcess < Test::Unit::TestCase
IO.popen([*PWD, :chdir => d]) {|io|
assert_equal(d, io.read.chomp)
}
- assert_raise(Errno::ENOENT) {
+ assert_raise_with_message(Errno::ENOENT, %r"d/notexist") {
Process.wait Process.spawn(*PWD, :chdir => "d/notexist")
}
+ n = "d/\u{1F37A}"
+ assert_raise_with_message(Errno::ENOENT, /#{n}/) {
+ Process.wait Process.spawn(*PWD, :chdir => n)
+ }
}
end