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

ruby-changes:19135

From: usa <ko1@a...>
Date: Fri, 25 Mar 2011 11:50:27 +0900 (JST)
Subject: [ruby-changes:19135] Ruby:r31174 (trunk): * test/ruby/test_process.rb (TestProcess#test_no_curdir): skip silently on

usa	2011-03-25 11:50:17 +0900 (Fri, 25 Mar 2011)

  New Revision: 31174

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

  Log:
    * test/ruby/test_process.rb (TestProcess#test_no_curdir): skip silently on
      Windows, because this tests a platform specific feature and it'll never be
      supported on ruby on Windows.
    
    * test/ruby/test_dir_m17n.rb (TestDir_M17N#test_filename_extutf8_invalid,
      TestDir_M17N#test_filename_as_bytes_extutf8): ditto.
    
    * test/open-uri/test_open-uri.rb
      (TestOpenURI#test_find_proxy_case_sensitive_env): ditto.
    
    * test/dl/test_handle.rb (DL::TestHandle#test_NEXT,
      DL::TestHandle#test_DEFAULT): ditto.

  Modified files:
    trunk/ChangeLog
    trunk/test/dl/test_handle.rb
    trunk/test/open-uri/test_open-uri.rb
    trunk/test/ruby/test_dir_m17n.rb
    trunk/test/ruby/test_process.rb

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 31173)
+++ ChangeLog	(revision 31174)
@@ -1,3 +1,19 @@
+Fri Mar 25 11:49:29 2011  NAKAMURA Usaku  <usa@r...>
+
+	* test/ruby/test_process.rb (TestProcess#test_no_curdir): skip silently
+	  on Windows, because this tests a platform specific feature and it'll
+	  never be supported on ruby on Windows.
+
+	* test/ruby/test_dir_m17n.rb
+	  (TestDir_M17N#test_filename_extutf8_invalid,
+	  TestDir_M17N#test_filename_as_bytes_extutf8): ditto.
+
+	* test/open-uri/test_open-uri.rb
+	  (TestOpenURI#test_find_proxy_case_sensitive_env): ditto.
+
+	* test/dl/test_handle.rb (DL::TestHandle#test_NEXT,
+	  DL::TestHandle#test_DEFAULT): ditto.
+
 Thu Mar 24 23:06:29 2011  Nobuyoshi Nakada  <nobu@r...>
 
 	* vm_insnhelper.c (vm_get_ev_const): should not autoload in
Index: test/ruby/test_process.rb
===================================================================
--- test/ruby/test_process.rb	(revision 31173)
+++ test/ruby/test_process.rb	(revision 31174)
@@ -1209,9 +1209,6 @@
   end
 
   def test_no_curdir
-    if /mswin|bccwin|mingw/ =~ RUBY_PLATFORM
-      skip "removing current directory is not supported"
-    end
     with_tmpchdir {|d|
       Dir.mkdir("vd")
       status = nil
@@ -1224,7 +1221,7 @@
       }
       assert(status.success?, "[ruby-dev:38105]")
     }
-  end
+  end unless /mswin|bccwin|mingw/ =~ RUBY_PLATFORM
 
   def test_fallback_to_sh
     feature = '[ruby-core:32745]'
Index: test/ruby/test_dir_m17n.rb
===================================================================
--- test/ruby/test_dir_m17n.rb	(revision 31173)
+++ test/ruby/test_dir_m17n.rb	(revision 31174)
@@ -26,7 +26,6 @@
   end
 
   def test_filename_extutf8_invalid
-    skip "ruby on windows doesn't support invalid utf-8 path" if /mswin|mingw/ =~ RUBY_PLATFORM
     with_tmpdir {|d|
       assert_ruby_status(%w[-EASCII-8BIT], <<-'EOS', nil, :chdir=>d)
         filename = "\xff".force_encoding("ASCII-8BIT") # invalid byte sequence as UTF-8
@@ -43,7 +42,7 @@
         exit ents.include?(filename) || ((RUBY_PLATFORM =~ /darwin/) != nil && ents.include?("%FF"))
       EOS
     }
-  end
+  end unless /mswin|mingw/ =~ RUBY_PLATFORM
 
   def test_filename_as_bytes_extutf8
     with_tmpdir {|d|
@@ -67,18 +66,20 @@
           exit false
         end
       EOS
-      skip "no meaning test on windows" if /mswin|mingw/ =~ RUBY_PLATFORM
-      assert_ruby_status(%w[-EUTF-8], <<-'EOS', nil, :chdir=>d)
-        filename1 = "\xc2\xa1".force_encoding("utf-8")
-        filename2 = "\xc2\xa1".force_encoding("euc-jp")
-        filename3 = filename1.encode("euc-jp")
-        filename4 = filename2.encode("utf-8")
-        s1 = File.stat(filename1) rescue nil
-        s2 = File.stat(filename2) rescue nil
-        s3 = File.stat(filename3) rescue nil
-        s4 = File.stat(filename4) rescue nil
-        exit((s1 && s2 && !s3 && !s4) ? true : false)
-      EOS
+      # no meaning test on windows
+      unless /mswin|mingw/ =~ RUBY_PLATFORM
+        assert_ruby_status(%w[-EUTF-8], <<-'EOS', nil, :chdir=>d)
+          filename1 = "\xc2\xa1".force_encoding("utf-8")
+          filename2 = "\xc2\xa1".force_encoding("euc-jp")
+          filename3 = filename1.encode("euc-jp")
+          filename4 = filename2.encode("utf-8")
+          s1 = File.stat(filename1) rescue nil
+          s2 = File.stat(filename2) rescue nil
+          s3 = File.stat(filename3) rescue nil
+          s4 = File.stat(filename4) rescue nil
+          exit((s1 && s2 && !s3 && !s4) ? true : false)
+        EOS
+      end
     }
   end
 
Index: test/open-uri/test_open-uri.rb
===================================================================
--- test/open-uri/test_open-uri.rb	(revision 31173)
+++ test/open-uri/test_open-uri.rb	(revision 31174)
@@ -522,7 +522,6 @@
   end
 
   def test_find_proxy_case_sensitive_env
-    skip "environment variable name is not case sensitive on Windows" if RUBY_PLATFORM =~ /mswin|mingw/
     with_env('http_proxy'=>'http://127.0.0.1:8080', 'REQUEST_METHOD'=>'GET') {
       assert_equal(URI('http://127.0.0.1:8080'), URI("http://192.0.2.1/").find_proxy)
     }
@@ -532,7 +531,7 @@
     with_env('http_proxy'=>'http://127.0.0.1:8080', 'HTTP_PROXY'=>'http://127.0.0.1:8081', 'REQUEST_METHOD'=>'GET') {
       assert_equal(URI('http://127.0.0.1:8080'), URI("http://192.0.2.1/").find_proxy)
     }
-  end
+  end unless RUBY_PLATFORM =~ /mswin|mingw/
 
   def test_ftp_invalid_request
     assert_raise(ArgumentError) { URI("ftp://127.0.0.1/").read }
Index: test/dl/test_handle.rb
===================================================================
--- test/dl/test_handle.rb	(revision 31173)
+++ test/dl/test_handle.rb	(revision 31174)
@@ -133,7 +133,6 @@
     end
 
     def test_NEXT
-      skip "DL::Handle::NEXT is not supported" if /mswin|mingw/ =~ RUBY_PLATFORM
       begin
         # Linux / Darwin
         #
@@ -163,12 +162,12 @@
         handle = DL::Handle::NEXT
         assert_not_nil handle['Init_objspace']
       end
-    end
+    end unless /mswin|mingw/ =~ RUBY_PLATFORM
 
     def test_DEFAULT
       skip "DL::Handle::DEFAULT is not supported" if /mswin|mingw/ =~ RUBY_PLATFORM
       handle = DL::Handle::DEFAULT
       assert_not_nil handle['malloc']
-    end
+    end unless /mswin|mingw/ =~ RUBY_PLATFORM
   end
 end

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

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