diff options
Diffstat (limited to 'test/ruby')
| -rw-r--r-- | test/ruby/test_dir_m17n.rb | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/test/ruby/test_dir_m17n.rb b/test/ruby/test_dir_m17n.rb index 1644a6de65..9485ee8ba4 100644 --- a/test/ruby/test_dir_m17n.rb +++ b/test/ruby/test_dir_m17n.rb @@ -196,10 +196,9 @@ class TestDir_M17N < Test::Unit::TestCase EOS assert_ruby_status(%w[-EASCII-8BIT], <<-'EOS', nil, :chdir=>d) filename = "\xA4\xA2".force_encoding('ASCII-8BIT') - win_expected_filename = filename.encode(Encoding.find("filesystem")) rescue "?" + win_expected_filename = filename.force_encoding("euc-jp").encode(Encoding.find("filesystem")) rescue "?" opts = {:encoding => Encoding.default_external} if /mswin|mingw/ =~ RUBY_PLATFORM ents = Dir.entries(".", opts) - p ents result = ents.include?(filename) || (/darwin/ =~ RUBY_PLATFORM && ents.include?("%A4%A2".force_encoding("ASCII-8BIT"))) || (/mswin|mingw/ =~ RUBY_PLATFORM && ents.include?(win_expected_filename.force_encoding("ASCII-8BIT"))) |
