mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
test_rubyoptions.rb: locale name
* test/ruby/test_rubyoptions.rb: try locale encoding name. [ruby-core:67109] [Bug #10643] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49091 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
8717a9ec86
commit
418c1375fb
2 changed files with 14 additions and 2 deletions
|
|
@ -1,3 +1,8 @@
|
||||||
|
Thu Jan 1 17:50:52 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
|
* test/ruby/test_rubyoptions.rb: try locale encoding name.
|
||||||
|
[ruby-core:67109] [Bug #10643]
|
||||||
|
|
||||||
Thu Jan 1 11:07:12 2015 Eric Wong <e@80x24.org>
|
Thu Jan 1 11:07:12 2015 Eric Wong <e@80x24.org>
|
||||||
|
|
||||||
* symbol.c (rb_gc_free_dsymbol): delete from global fstr hash
|
* symbol.c (rb_gc_free_dsymbol): delete from global fstr hash
|
||||||
|
|
|
||||||
|
|
@ -712,8 +712,15 @@ class TestRubyOptions < Test::Unit::TestCase
|
||||||
|
|
||||||
def test_command_line_progname_nonascii
|
def test_command_line_progname_nonascii
|
||||||
bug10555 = '[ruby-dev:48752] [Bug #10555]'
|
bug10555 = '[ruby-dev:48752] [Bug #10555]'
|
||||||
name = "\u{3042}.rb"
|
name = expected = nil
|
||||||
expected = name.encode("locale") rescue "?.rb"
|
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|
|
with_tmpchdir do |dir|
|
||||||
open(name, "w") {|f| f.puts "puts File.basename($0)"}
|
open(name, "w") {|f| f.puts "puts File.basename($0)"}
|
||||||
assert_in_out_err([name], "", [expected], [],
|
assert_in_out_err([name], "", [expected], [],
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue