ruby-changes:13978
From: akr <ko1@a...>
Date: Mon, 16 Nov 2009 02:58:47 +0900 (JST)
Subject: [ruby-changes:13978] Ruby:r25786 (trunk): add a test.
akr 2009-11-16 02:58:14 +0900 (Mon, 16 Nov 2009) New Revision: 25786 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=25786 Log: add a test. Modified files: trunk/test/ruby/test_dir_m17n.rb Index: test/ruby/test_dir_m17n.rb =================================================================== --- test/ruby/test_dir_m17n.rb (revision 25785) +++ test/ruby/test_dir_m17n.rb (revision 25786) @@ -64,12 +64,28 @@ 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 + } + end + end -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/