From 33ea2646b98adb49ae2e1781753bf22d33729ac0 Mon Sep 17 00:00:00 2001 From: nobu Date: Sat, 29 Nov 2014 07:53:17 +0000 Subject: win32.c: use UTF-8 for argv * ruby.c (ruby_set_argv): convert argv from UTF-8. * win32/win32.c (rb_w32_sysinit, cmdglob, w32_cmdvector): convert wide char command line to UTF-8 argv, and glob in UTF-8 so that metacharacters would match multibyte characters. [ruby-dev:48752] [Bug #10555] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48648 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_rubyoptions.rb | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'test') diff --git a/test/ruby/test_rubyoptions.rb b/test/ruby/test_rubyoptions.rb index 31fe9aecb0..20dbc7798f 100644 --- a/test/ruby/test_rubyoptions.rb +++ b/test/ruby/test_rubyoptions.rb @@ -694,6 +694,18 @@ class TestRubyOptions < Test::Unit::TestCase end end + if /mswin|mingw/ =~ RUBY_PLATFORM + def test_command_line_glob_nonascii + bug10555 = '[ruby-dev:48752] [Bug #10555]' + name = "\u{3042}.txt" + with_tmpchdir do |dir| + open(name, "w") {} + assert_in_out_err(["-Eutf-8", "-e", "puts ARGV", "?.txt"], "", [name], [], + bug10555, encoding: "utf-8") + end + end + end + def test_script_is_directory feature2408 = '[ruby-core:26925]' assert_in_out_err(%w[.], "", [], /Is a directory -- \./, feature2408) -- cgit v1.2.3