diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-06-16 05:35:59 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-06-16 05:35:59 +0000 |
commit | fd444f90b5ec99c8081222d91a6e8d172e617bb9 (patch) | |
tree | 8d787e874f568ed063477b2e09b75cf19120f7b7 /test | |
parent | 7539177d7167943c179fa893ac274f0048e4189f (diff) | |
download | ruby-fd444f90b5ec99c8081222d91a6e8d172e617bb9.tar.gz |
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')
-rw-r--r-- | test/ruby/test_process.rb | 10 |
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") |