summaryrefslogtreecommitdiff
path: root/test/ruby/test_process.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-06-16 05:35:59 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-06-16 05:35:59 +0000
commitfd444f90b5ec99c8081222d91a6e8d172e617bb9 (patch)
tree8d787e874f568ed063477b2e09b75cf19120f7b7 /test/ruby/test_process.rb
parent7539177d7167943c179fa893ac274f0048e4189f (diff)
process.c: use UTF-8
* 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/trunk@46441 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_process.rb')
-rw-r--r--test/ruby/test_process.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/ruby/test_process.rb b/test/ruby/test_process.rb
index ccd5676171..608d663027 100644
--- a/test/ruby/test_process.rb
+++ b/test/ruby/test_process.rb
@@ -613,6 +613,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_to_out_and_err
with_tmpchdir {|d|
ret = system(RUBY, "-e", 'STDERR.print "e"; STDOUT.print "o"', [:out, :err] => "foo")