mirror of
https://github.com/ruby/ruby.git
synced 2025-09-20 02:53:57 +02:00
* test/ruby/test_process.rb: skip some tests on Windows.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27793 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
4eb19660e9
commit
d863f7af0c
1 changed files with 17 additions and 17 deletions
|
@ -466,25 +466,25 @@ class TestProcess < Test::Unit::TestCase
|
||||||
}
|
}
|
||||||
Process.wait pid
|
Process.wait pid
|
||||||
}
|
}
|
||||||
|
|
||||||
|
closed_fd = nil
|
||||||
|
with_pipes(5) {|pipes|
|
||||||
|
io = pipes.last.last
|
||||||
|
closed_fd = io.fileno
|
||||||
|
}
|
||||||
|
assert_raise(Errno::EBADF) { Process.wait spawn(*TRUECOMMAND, closed_fd=>closed_fd) }
|
||||||
|
|
||||||
|
with_pipe {|r, w|
|
||||||
|
if w.respond_to?(:"close_on_exec=")
|
||||||
|
w.close_on_exec = true
|
||||||
|
pid = spawn(RUBY, "-e", "IO.new(#{w.fileno}, 'w').print 'a'", w=>w)
|
||||||
|
w.close
|
||||||
|
assert_equal("a", r.read)
|
||||||
|
Process.wait pid
|
||||||
|
end
|
||||||
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
closed_fd = nil
|
|
||||||
with_pipes(5) {|pipes|
|
|
||||||
io = pipes.last.last
|
|
||||||
closed_fd = io.fileno
|
|
||||||
}
|
|
||||||
assert_raise(Errno::EBADF) { Process.wait spawn(*TRUECOMMAND, closed_fd=>closed_fd) }
|
|
||||||
|
|
||||||
with_pipe {|r, w|
|
|
||||||
if w.respond_to?(:"close_on_exec=")
|
|
||||||
w.close_on_exec = true
|
|
||||||
pid = spawn(RUBY, "-e", "IO.new(#{w.fileno}, 'w').print 'a'", w=>w)
|
|
||||||
w.close
|
|
||||||
assert_equal("a", r.read)
|
|
||||||
Process.wait pid
|
|
||||||
end
|
|
||||||
}
|
|
||||||
|
|
||||||
system(*ECHO["funya"], :out=>"out")
|
system(*ECHO["funya"], :out=>"out")
|
||||||
assert_equal("funya\n", File.read("out"))
|
assert_equal("funya\n", File.read("out"))
|
||||||
system(RUBY, '-e', 'STDOUT.reopen(STDERR); puts "henya"', :err=>"out")
|
system(RUBY, '-e', 'STDOUT.reopen(STDERR); puts "henya"', :err=>"out")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue