mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
force_encoding expected result as filesystem encoding
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40869 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
1891b60f26
commit
32c5c675f2
1 changed files with 4 additions and 0 deletions
|
@ -320,6 +320,10 @@ class TestDir_M17N < Test::Unit::TestCase
|
|||
if /mswin|mingw/ =~ RUBY_PLATFORM
|
||||
opts = {:encoding => Encoding.default_external}
|
||||
orig.map! {|o| o.encode(Encoding.find("filesystem")) rescue o.tr("^a-z", "?")}
|
||||
else
|
||||
enc = Encoding.find("filesystem")
|
||||
enc = Encoding::ASCII_8BIT if enc == Encoding::US_ASCII
|
||||
orig.map {|o| o.force_encoding(enc) }
|
||||
end
|
||||
ents = Dir.entries(".", opts).reject {|n| /\A\./ =~ n}
|
||||
pp.assert_equal(orig, ents, bug7267)
|
||||
|
|
Loading…
Reference in a new issue