[前][次][番号順一覧][スレッド一覧]

ruby-changes:24465

From: usa <ko1@a...>
Date: Tue, 24 Jul 2012 12:36:39 +0900 (JST)
Subject: [ruby-changes:24465] usa:r36516 (trunk): * test/ruby/test_dir_m17n.rb: remove a garbage.

usa	2012-07-24 12:36:29 +0900 (Tue, 24 Jul 2012)

  New Revision: 36516

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=36516

  Log:
    * 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.

  Modified files:
    trunk/ChangeLog
    trunk/test/ruby/test_dir_m17n.rb

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 36515)
+++ ChangeLog	(revision 36516)
@@ -1,3 +1,10 @@
+Tue Jul 24 12:35:13 2012  NAKAMURA Usaku  <usa@r...>
+
+	* 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@r...>
 
 	* test/ruby/test_dir_m17n.rb: sorry, typo.
Index: test/ruby/test_dir_m17n.rb
===================================================================
--- test/ruby/test_dir_m17n.rb	(revision 36515)
+++ test/ruby/test_dir_m17n.rb	(revision 36516)
@@ -196,10 +196,9 @@
       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")))

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]