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

ruby-changes:5004

From: ko1@a...
Date: Wed, 21 May 2008 01:48:51 +0900 (JST)
Subject: [ruby-changes:5004] usa - Ruby:r16497 (trunk): * test/ruby/test_file_exhaustive.rb (setup): workaround for Windows

usa	2008-05-21 01:48:32 +0900 (Wed, 21 May 2008)

  New Revision: 16497

  Modified files:
    trunk/ChangeLog
    trunk/test/ruby/envutil.rb
    trunk/test/ruby/test_file_exhaustive.rb
    trunk/test/ruby/test_process.rb

  Log:
    * test/ruby/test_file_exhaustive.rb (setup): workaround for Windows
      Vista.
    
    * test/ruby/envutil.rb (rubyexec): now Open3.open3 is supported on
      Windows.
    
    * test/ruby/test_process.rb: use ``||'' instead of ``;'' because
      cmd.exe not support it.
    


  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/test/ruby/test_file_exhaustive.rb?r1=16497&r2=16496&diff_format=u
  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/test/ruby/test_process.rb?r1=16497&r2=16496&diff_format=u
  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/ChangeLog?r1=16497&r2=16496&diff_format=u
  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/test/ruby/envutil.rb?r1=16497&r2=16496&diff_format=u

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 16496)
+++ ChangeLog	(revision 16497)
@@ -1,3 +1,14 @@
+Wed May 21 01:45:58 2008  NAKAMURA Usaku  <usa@r...>
+
+	* test/ruby/test_file_exhaustive.rb (setup): workaround for Windows
+	  Vista.
+
+	* test/ruby/envutil.rb (rubyexec): now Open3.open3 is supported on
+	  Windows.
+
+	* test/ruby/test_process.rb: use ``||'' instead of ``;'' because
+	  cmd.exe not support it.
+
 Wed May 21 01:28:47 2008  NARUSE, Yui  <naruse@r...>
 
 	* transcode.c, include/ruby/encodng.h (rb_str_transcode):
Index: test/ruby/test_file_exhaustive.rb
===================================================================
--- test/ruby/test_file_exhaustive.rb	(revision 16496)
+++ test/ruby/test_file_exhaustive.rb	(revision 16497)
@@ -20,7 +20,7 @@
     end
     begin
       File.link(@file, @hardlinkfile)
-    rescue NotImplementedError
+    rescue NotImplementedError, Errno::EINVAL	# EINVAL for Windows Vista
       @hardlinkfile = nil
     end
   end
Index: test/ruby/test_process.rb
===================================================================
--- test/ruby/test_process.rb	(revision 16496)
+++ test/ruby/test_process.rb	(revision 16497)
@@ -697,7 +697,7 @@
         File.open("result2", "w") {|t| t << "taki pid=#{$$} ppid=#{Process.ppid}" }
         exit 8
       End
-      ret = system("#{RUBY} script1; #{RUBY} script2")
+      ret = system("#{RUBY} script1 || #{RUBY} script2")
       status = $?
       assert_equal(false, ret)
       assert(status.exited?)
@@ -719,7 +719,7 @@
         File.open("result2", "w") {|t| t << "take pid=#{$$} ppid=#{Process.ppid}" }
         exit 8
       End
-      pid = spawn("#{RUBY} script1; #{RUBY} script2")
+      pid = spawn("#{RUBY} script1 || #{RUBY} script2")
       Process.wait pid
       status = $?
       assert(status.exited?)
@@ -742,7 +742,7 @@
         puts "tika pid=#{$$} ppid=#{Process.ppid}"
         exit 8
       End
-      io = IO.popen("#{RUBY} script1; #{RUBY} script2")
+      io = IO.popen("#{RUBY} script1 || #{RUBY} script2")
       result = io.read
       io.close
       status = $?
@@ -765,7 +765,7 @@
       End
       write_file("s", <<-"End")
 	ruby = #{RUBY.dump}
-	exec("\#{ruby} script1; \#{ruby} script2")
+	exec("\#{ruby} script1 || \#{ruby} script2")
       End
       pid = spawn RUBY, "s"
       Process.wait pid
Index: test/ruby/envutil.rb
===================================================================
--- test/ruby/envutil.rb	(revision 16496)
+++ test/ruby/envutil.rb	(revision 16497)
@@ -34,11 +34,6 @@
 
   LANG_ENVS = %w"LANG LC_ALL LC_CTYPE"
   def rubyexec(*args)
-    if /(mswin|bccwin|mingw|emx)/ =~ RUBY_PLATFORM
-      flunk("cannot test in win32")
-      return
-    end
-
     ruby = EnvUtil.rubybin
     c = "C"
     env = {}

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

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