From be3de529c24ae4d12c030f915d4d4914e2d5ceb5 Mon Sep 17 00:00:00 2001 From: nobu Date: Mon, 7 Sep 2015 14:45:31 +0000 Subject: 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 --- test/ruby/test_process.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'test/ruby/test_process.rb') 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 -- cgit v1.2.3