From 784005805cd879ef3e51111f778e74741fb0ba0b Mon Sep 17 00:00:00 2001 From: usa Date: Thu, 25 Feb 2016 09:58:20 +0000 Subject: merge revision(s) 53346,53347,53348,53349,53391,53928: [Backport #11898] * process.c: use rb_w32_uchdir() instead of plain chdir() on Windows. reported by naruse via twitter. * process.c (rb_execarg_addopt): need to convert to ospath. * process.c (rb_execarg_parent_start1): need to convert the encoding to ospath's one. * process.c (rb_execarg_addopt): need to convert the encoding to ospath's one. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_1@53929 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_process.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'test') diff --git a/test/ruby/test_process.rb b/test/ruby/test_process.rb index 28e08ced2b..ec59c8eb30 100644 --- a/test/ruby/test_process.rb +++ b/test/ruby/test_process.rb @@ -413,6 +413,16 @@ class TestProcess < Test::Unit::TestCase } end + def test_execopts_open_chdir_m17n_path + with_tmpchdir {|d| + Dir.mkdir "テスト" + system(*PWD, :chdir => "テスト", :out => "open_chdir_テスト") + assert_file.exist?("open_chdir_テスト") + assert_file.not_exist?("テスト/open_chdir_テスト") + assert_equal("#{d}/テスト", File.read("open_chdir_テスト").chomp.encode(__ENCODING__)) + } + end if windows? || Encoding.find('locale') == Encoding::UTF_8 + UMASK = [RUBY, '-e', 'printf "%04o\n", File.umask'] def test_execopts_umask -- cgit v1.2.3