diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-09-07 14:45:31 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-09-07 14:45:31 +0000 |
commit | 7efecf9f718b5cc677d7f582e575e64013ddc405 (patch) | |
tree | 6deb0340d3535db63e9feeeda963701320f046f7 /test/ruby/test_process.rb | |
parent | d228531ca245a3fb7f3de293a2b96ceacb10658b (diff) | |
download | ruby-7efecf9f718b5cc677d7f582e575e64013ddc405.tar.gz |
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.rb | 6 |
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 |