1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

add a test.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25786 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
akr 2009-11-15 17:58:14 +00:00
parent e88009f40e
commit 5f221c31ed

View file

@ -64,7 +64,23 @@ class TestDir_M17N < Test::Unit::TestCase
exit ents.include?(filename)
EOS
assert_ruby_status(%w[-EEUC-JP:UTF-8], <<-'EOS', nil, :chdir=>d)
filename = "\u3042".force_encoding("utf-8")
filename = "\u3042"
ents = Dir.entries(".")
exit ents.include?(filename)
EOS
}
end
def test_filename_ext_utf_8_and_int_euc_jp
with_tmpdir {|d|
assert_ruby_status(%w[-EUTF-8], <<-'EOS', nil, :chdir=>d)
filename = "\u3042"
File.open(filename, "w") {}
ents = Dir.entries(".")
exit ents.include?(filename)
EOS
assert_ruby_status(%w[-EUTF-8:EUC-JP], <<-'EOS', nil, :chdir=>d)
filename = "\xA4\xA2".force_encoding("euc-jp")
ents = Dir.entries(".")
exit ents.include?(filename)
EOS