summaryrefslogtreecommitdiffstats
path: root/test/ruby
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-05-20 16:48:32 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-05-20 16:48:32 +0000
commit8eeac1072c96192f35456fcf3f88e3b8fb446ce7 (patch)
tree29560fe29b91da535ea6ee0847437b4789aa3c65 /test/ruby
parent73941dca84ba21751336aa3d10c0ffe962870b90 (diff)
downloadruby-8eeac1072c96192f35456fcf3f88e3b8fb446ce7.tar.gz
ruby-8eeac1072c96192f35456fcf3f88e3b8fb446ce7.tar.xz
ruby-8eeac1072c96192f35456fcf3f88e3b8fb446ce7.zip
* 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. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@16497 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby')
-rw-r--r--test/ruby/envutil.rb5
-rw-r--r--test/ruby/test_file_exhaustive.rb2
-rw-r--r--test/ruby/test_process.rb8
3 files changed, 5 insertions, 10 deletions
diff --git a/test/ruby/envutil.rb b/test/ruby/envutil.rb
index bc9a2fa0a..bfecb6008 100644
--- a/test/ruby/envutil.rb
+++ b/test/ruby/envutil.rb
@@ -34,11 +34,6 @@ module EnvUtil
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 = {}
diff --git a/test/ruby/test_file_exhaustive.rb b/test/ruby/test_file_exhaustive.rb
index 274f7bf05..24072472e 100644
--- a/test/ruby/test_file_exhaustive.rb
+++ b/test/ruby/test_file_exhaustive.rb
@@ -20,7 +20,7 @@ class TestFileExhaustive < Test::Unit::TestCase
end
begin
File.link(@file, @hardlinkfile)
- rescue NotImplementedError
+ rescue NotImplementedError, Errno::EINVAL # EINVAL for Windows Vista
@hardlinkfile = nil
end
end
diff --git a/test/ruby/test_process.rb b/test/ruby/test_process.rb
index d90fa06fb..6e96281bb 100644
--- a/test/ruby/test_process.rb
+++ b/test/ruby/test_process.rb
@@ -697,7 +697,7 @@ class TestProcess < Test::Unit::TestCase
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 @@ class TestProcess < Test::Unit::TestCase
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 @@ class TestProcess < Test::Unit::TestCase
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 @@ class TestProcess < Test::Unit::TestCase
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