ruby-changes:37010
From: nobu <ko1@a...>
Date: Thu, 1 Jan 2015 17:51:12 +0900 (JST)
Subject: [ruby-changes:37010] nobu:r49091 (trunk): test_rubyoptions.rb: locale name
nobu 2015-01-01 17:50:55 +0900 (Thu, 01 Jan 2015) New Revision: 49091 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=49091 Log: test_rubyoptions.rb: locale name * test/ruby/test_rubyoptions.rb: try locale encoding name. [ruby-core:67109] [Bug #10643] Modified files: trunk/ChangeLog trunk/test/ruby/test_rubyoptions.rb Index: ChangeLog =================================================================== --- ChangeLog (revision 49090) +++ ChangeLog (revision 49091) @@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Thu Jan 1 17:50:52 2015 Nobuyoshi Nakada <nobu@r...> + + * test/ruby/test_rubyoptions.rb: try locale encoding name. + [ruby-core:67109] [Bug #10643] + Thu Jan 1 11:07:12 2015 Eric Wong <e@8...> * symbol.c (rb_gc_free_dsymbol): delete from global fstr hash Index: test/ruby/test_rubyoptions.rb =================================================================== --- test/ruby/test_rubyoptions.rb (revision 49090) +++ test/ruby/test_rubyoptions.rb (revision 49091) @@ -712,8 +712,15 @@ class TestRubyOptions < Test::Unit::Test https://github.com/ruby/ruby/blob/trunk/test/ruby/test_rubyoptions.rb#L712 def test_command_line_progname_nonascii bug10555 = '[ruby-dev:48752] [Bug #10555]' - name = "\u{3042}.rb" - expected = name.encode("locale") rescue "?.rb" + name = expected = nil + unless (0x80..0x10000).any? {|c| + name = c.chr(Encoding::UTF_8) + expected = name.encode("locale") rescue nil + } + skip "can't make locale name" + end + name << ".rb" + expected << ".rb" with_tmpchdir do |dir| open(name, "w") {|f| f.puts "puts File.basename($0)"} assert_in_out_err([name], "", [expected], [], -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/