summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-07-24 03:36:29 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-07-24 03:36:29 +0000
commit2b4f1eed4ccd61708612e06b8476871066de4c0f (patch)
treee779abae2372100d19f99411e2a8674ecf46be10
parent989a6cb176522792198344fd041425e5891b2510 (diff)
* test/ruby/test_dir_m17n.rb: remove a garbage.
* test/ruby/test_dir_m17n.rb: convert from ascii-8bit to other encoding with 8bit bytes always fails. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36516 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog7
-rw-r--r--test/ruby/test_dir_m17n.rb3
2 files changed, 8 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index d06d243f52..a47543410b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+Tue Jul 24 12:35:13 2012 NAKAMURA Usaku <usa@ruby-lang.org>
+
+ * test/ruby/test_dir_m17n.rb: remove a garbage.
+
+ * test/ruby/test_dir_m17n.rb: convert from ascii-8bit to other encoding
+ with 8bit bytes always fails.
+
Tue Jul 24 12:32:18 2012 NAKAMURA Usaku <usa@ruby-lang.org>
* test/ruby/test_dir_m17n.rb: sorry, typo.
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")))