mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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: svn+ssh://ci.ruby-lang.org/ruby/trunk@16497 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
95698ff2a4
commit
1de486b600
4 changed files with 16 additions and 10 deletions
11
ChangeLog
11
ChangeLog
|
@ -1,3 +1,14 @@
|
||||||
|
Wed May 21 01:45:58 2008 NAKAMURA Usaku <usa@ruby-lang.org>
|
||||||
|
|
||||||
|
* 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@ruby-lang.org>
|
Wed May 21 01:28:47 2008 NARUSE, Yui <naruse@ruby-lang.org>
|
||||||
|
|
||||||
* transcode.c, include/ruby/encodng.h (rb_str_transcode):
|
* transcode.c, include/ruby/encodng.h (rb_str_transcode):
|
||||||
|
|
|
@ -34,11 +34,6 @@ module EnvUtil
|
||||||
|
|
||||||
LANG_ENVS = %w"LANG LC_ALL LC_CTYPE"
|
LANG_ENVS = %w"LANG LC_ALL LC_CTYPE"
|
||||||
def rubyexec(*args)
|
def rubyexec(*args)
|
||||||
if /(mswin|bccwin|mingw|emx)/ =~ RUBY_PLATFORM
|
|
||||||
flunk("cannot test in win32")
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
ruby = EnvUtil.rubybin
|
ruby = EnvUtil.rubybin
|
||||||
c = "C"
|
c = "C"
|
||||||
env = {}
|
env = {}
|
||||||
|
|
|
@ -20,7 +20,7 @@ class TestFileExhaustive < Test::Unit::TestCase
|
||||||
end
|
end
|
||||||
begin
|
begin
|
||||||
File.link(@file, @hardlinkfile)
|
File.link(@file, @hardlinkfile)
|
||||||
rescue NotImplementedError
|
rescue NotImplementedError, Errno::EINVAL # EINVAL for Windows Vista
|
||||||
@hardlinkfile = nil
|
@hardlinkfile = nil
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -697,7 +697,7 @@ class TestProcess < Test::Unit::TestCase
|
||||||
File.open("result2", "w") {|t| t << "taki pid=#{$$} ppid=#{Process.ppid}" }
|
File.open("result2", "w") {|t| t << "taki pid=#{$$} ppid=#{Process.ppid}" }
|
||||||
exit 8
|
exit 8
|
||||||
End
|
End
|
||||||
ret = system("#{RUBY} script1; #{RUBY} script2")
|
ret = system("#{RUBY} script1 || #{RUBY} script2")
|
||||||
status = $?
|
status = $?
|
||||||
assert_equal(false, ret)
|
assert_equal(false, ret)
|
||||||
assert(status.exited?)
|
assert(status.exited?)
|
||||||
|
@ -719,7 +719,7 @@ class TestProcess < Test::Unit::TestCase
|
||||||
File.open("result2", "w") {|t| t << "take pid=#{$$} ppid=#{Process.ppid}" }
|
File.open("result2", "w") {|t| t << "take pid=#{$$} ppid=#{Process.ppid}" }
|
||||||
exit 8
|
exit 8
|
||||||
End
|
End
|
||||||
pid = spawn("#{RUBY} script1; #{RUBY} script2")
|
pid = spawn("#{RUBY} script1 || #{RUBY} script2")
|
||||||
Process.wait pid
|
Process.wait pid
|
||||||
status = $?
|
status = $?
|
||||||
assert(status.exited?)
|
assert(status.exited?)
|
||||||
|
@ -742,7 +742,7 @@ class TestProcess < Test::Unit::TestCase
|
||||||
puts "tika pid=#{$$} ppid=#{Process.ppid}"
|
puts "tika pid=#{$$} ppid=#{Process.ppid}"
|
||||||
exit 8
|
exit 8
|
||||||
End
|
End
|
||||||
io = IO.popen("#{RUBY} script1; #{RUBY} script2")
|
io = IO.popen("#{RUBY} script1 || #{RUBY} script2")
|
||||||
result = io.read
|
result = io.read
|
||||||
io.close
|
io.close
|
||||||
status = $?
|
status = $?
|
||||||
|
@ -765,7 +765,7 @@ class TestProcess < Test::Unit::TestCase
|
||||||
End
|
End
|
||||||
write_file("s", <<-"End")
|
write_file("s", <<-"End")
|
||||||
ruby = #{RUBY.dump}
|
ruby = #{RUBY.dump}
|
||||||
exec("\#{ruby} script1; \#{ruby} script2")
|
exec("\#{ruby} script1 || \#{ruby} script2")
|
||||||
End
|
End
|
||||||
pid = spawn RUBY, "s"
|
pid = spawn RUBY, "s"
|
||||||
Process.wait pid
|
Process.wait pid
|
||||||
|
|
Loading…
Reference in a new issue