diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-11-29 15:02:58 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-11-29 15:02:58 +0000 |
commit | 1ce81d6f8b00186dcae04005f502248f986fbe75 (patch) | |
tree | 37fbba1278ccfc02c9e0b4b9d26ab8e2d34f2a45 /test/ruby/test_rubyoptions.rb | |
parent | b4c3c3171f4a8b9c39b68bf5e545d8853b84ff77 (diff) | |
download | ruby-1ce81d6f8b00186dcae04005f502248f986fbe75.tar.gz |
ruby.c: transcode program names
* ruby.c (process_options, ruby_script): transcode script name and
program name to locale encoding as well as argv.
[ruby-dev:48752] [Bug #10555]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48652 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_rubyoptions.rb')
-rw-r--r-- | test/ruby/test_rubyoptions.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/ruby/test_rubyoptions.rb b/test/ruby/test_rubyoptions.rb index 3ab2f9b548..9b310e16b3 100644 --- a/test/ruby/test_rubyoptions.rb +++ b/test/ruby/test_rubyoptions.rb @@ -705,6 +705,17 @@ class TestRubyOptions < Test::Unit::TestCase bug10555, encoding: "locale") end end + + def test_command_line_progname_nonascii + bug10555 = '[ruby-dev:48752] [Bug #10555]' + name = "\u{3042}.rb" + expected = name.encode("locale") rescue "?.rb" + with_tmpchdir do |dir| + open(name, "w") {|f| f.puts "puts File.basename($0)"} + assert_in_out_err([name], "", [expected], [], + bug10555, encoding: "locale") + end + end end def test_script_is_directory |