diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-11-15 17:58:14 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-11-15 17:58:14 +0000 |
commit | 2ad00495842e4d7de2744d4ffb65a7a133eea87c (patch) | |
tree | 7d3fa23dacf07db608cd9b77ea36591ce488a13f | |
parent | 4fe6f84051d40b5cccef2c28b83b8d84e7a38905 (diff) | |
download | ruby-2ad00495842e4d7de2744d4ffb65a7a133eea87c.tar.gz ruby-2ad00495842e4d7de2744d4ffb65a7a133eea87c.tar.xz ruby-2ad00495842e4d7de2744d4ffb65a7a133eea87c.zip |
add a test.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@25786 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | test/ruby/test_dir_m17n.rb | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/test/ruby/test_dir_m17n.rb b/test/ruby/test_dir_m17n.rb index ad18ad753..209189ab4 100644 --- a/test/ruby/test_dir_m17n.rb +++ b/test/ruby/test_dir_m17n.rb @@ -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 |