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

ruby-changes:43379

From: duerst <ko1@a...>
Date: Sun, 19 Jun 2016 16:55:31 +0900 (JST)
Subject: [ruby-changes:43379] duerst:r55453 (trunk): * test/ruby/test_dir_m17n.rb: Skip tests with non-UTF-8 encodings

duerst	2016-06-19 16:55:25 +0900 (Sun, 19 Jun 2016)

  New Revision: 55453

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=55453

  Log:
    * test/ruby/test_dir_m17n.rb: Skip tests with non-UTF-8 encodings
      on cygwin. Cygwin can use the Unicode PUA (private use area) to store
      bytes from non-UTF-8 filenames (see
      https://cygwin.com/cygwin-ug-net/using-specialnames.html#pathnames-specialchars),
      but we are not supporting this. [Bug #12443]

  Modified files:
    trunk/ChangeLog
    trunk/test/ruby/test_dir_m17n.rb
Index: test/ruby/test_dir_m17n.rb
===================================================================
--- test/ruby/test_dir_m17n.rb	(revision 55452)
+++ test/ruby/test_dir_m17n.rb	(revision 55453)
@@ -21,6 +21,7 @@ class TestDir_M17N < Test::Unit::TestCas https://github.com/ruby/ruby/blob/trunk/test/ruby/test_dir_m17n.rb#L21
         assert_include(ents, filename)
       EOS
 
+      return if /cygwin/ =~ RUBY_PLATFORM
       assert_separately(%w[-EASCII-8BIT], <<-EOS, :chdir=>dir)
         filename = #{code}.chr('UTF-8').force_encoding("ASCII-8BIT")
         opts = {:encoding => Encoding.default_external} if /mswin|mingw/ =~ RUBY_PLATFORM
@@ -57,6 +58,7 @@ class TestDir_M17N < Test::Unit::TestCas https://github.com/ruby/ruby/blob/trunk/test/ruby/test_dir_m17n.rb#L58
   end
 
   def test_filename_extutf8_invalid
+    return if /cygwin/ =~ RUBY_PLATFORM
     with_tmpdir {|d|
       assert_separately(%w[-EASCII-8BIT], <<-'EOS', :chdir=>d)
         filename = "\xff".force_encoding("ASCII-8BIT") # invalid byte sequence as UTF-8
@@ -172,6 +174,7 @@ class TestDir_M17N < Test::Unit::TestCas https://github.com/ruby/ruby/blob/trunk/test/ruby/test_dir_m17n.rb#L174
   ## others
 
   def test_filename_bytes_euc_jp
+    return if /cygwin/ =~ RUBY_PLATFORM
     with_tmpdir {|d|
       assert_separately(%w[-EEUC-JP], <<-'EOS', :chdir=>d)
         filename = "\xA4\xA2".force_encoding("euc-jp")
@@ -188,6 +191,7 @@ class TestDir_M17N < Test::Unit::TestCas https://github.com/ruby/ruby/blob/trunk/test/ruby/test_dir_m17n.rb#L191
   end
 
   def test_filename_euc_jp
+    return if /cygwin/ =~ RUBY_PLATFORM
     with_tmpdir {|d|
       assert_separately(%w[-EEUC-JP], <<-'EOS', :chdir=>d)
         filename = "\xA4\xA2".force_encoding("euc-jp")
@@ -233,6 +237,7 @@ class TestDir_M17N < Test::Unit::TestCas https://github.com/ruby/ruby/blob/trunk/test/ruby/test_dir_m17n.rb#L237
   end
 
   def test_filename_ext_euc_jp_and_int_utf_8
+    return if /cygwin/ =~ RUBY_PLATFORM
     with_tmpdir {|d|
       assert_separately(%w[-EEUC-JP], <<-'EOS', :chdir=>d)
         filename = "\xA4\xA2".force_encoding("euc-jp")
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 55452)
+++ ChangeLog	(revision 55453)
@@ -1,3 +1,11 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Sun Jun 19 16:55:16 2016  Martin Duerst  <duerst@i...>
+
+	* test/ruby/test_dir_m17n.rb: Skip tests with non-UTF-8 encodings
+	  on cygwin. Cygwin can use the Unicode PUA (private use area) to store
+	  bytes from non-UTF-8 filenames (see
+	  https://cygwin.com/cygwin-ug-net/using-specialnames.html#pathnames-specialchars),
+	  but we are not supporting this. [Bug #12443]
+
 Sun Jun 19 15:01:18 2016  Martin Duerst  <duerst@i...>
 
 	* localeinit.c: Fix filesystem encoding for cygwin to UTF-8 (see

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

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