mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Update to ruby/spec@9277d27
This commit is contained in:
parent
ce986b41ca
commit
201d501640
17 changed files with 209 additions and 6 deletions
|
@ -536,6 +536,15 @@ describe "Process.spawn" do
|
|||
File.read(@name).should == "glarkbang"
|
||||
end
|
||||
|
||||
it "closes STDERR in the child if :err => :close" do
|
||||
File.open(@name, 'w') do |file|
|
||||
-> do
|
||||
code = "begin; STDOUT.puts 'out'; STDERR.puts 'hello'; rescue => e; puts 'rescued'; end"
|
||||
Process.wait Process.spawn(ruby_cmd(code), :out => file, :err => :close)
|
||||
end.should output_to_fd("out\nrescued\n", file)
|
||||
end
|
||||
end
|
||||
|
||||
# :close_others
|
||||
|
||||
platform_is_not :windows do
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue