From 2e86a92b3c9153bc5bc47e5684ab3ace70d824ae Mon Sep 17 00:00:00 2001 From: usa Date: Fri, 5 Sep 2014 05:05:42 +0000 Subject: merge revision(s) 46441: [Backport #9946] * process.c (open): use UTF-8 version function to support non-ascii path properly. [ruby-core:63185] [Bug #9946] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@47404 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_process.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'test/ruby') diff --git a/test/ruby/test_process.rb b/test/ruby/test_process.rb index c760e8ebda..8b79d35738 100644 --- a/test/ruby/test_process.rb +++ b/test/ruby/test_process.rb @@ -602,6 +602,16 @@ class TestProcess < Test::Unit::TestCase } end + def test_execopts_redirect_nonascii_path + bug9946 = '[ruby-core:63185] [Bug #9946]' + with_tmpchdir {|d| + path = "t-\u{30c6 30b9 30c8 f6}.txt" + system(*ECHO["a"], out: path) + assert_file.for(bug9946).exist?(path) + assert_equal("a\n", File.read(path), bug9946) + } + end + def test_execopts_redirect_dup2_child with_tmpchdir {|d| Process.wait spawn(RUBY, "-e", "STDERR.print 'err'; STDOUT.print 'out'", -- cgit v1.2.3