Skip to content

Commit 008cd1e

Browse files
committedOct 10, 2015
add spec for Process.spawn redirecting STDERR to child STDOUT
1 parent c8ce8a7 commit 008cd1e

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed
 

‎spec/ruby/shared/process/spawn.rb

+8
Original file line numberDiff line numberDiff line change
@@ -376,6 +376,14 @@
376376
@name.should have_data("glark")
377377
end
378378

379+
it "redirects STDERR to child STDOUT if :err => [:child, :out]" do
380+
File.open(@name, 'w') do |file|
381+
lambda do
382+
Process.wait @object.spawn(ruby_cmd("STDERR.print :glark"), :out => file, :err => [:child, :out])
383+
end.should output_to_fd("glark", file)
384+
end
385+
end
386+
379387
it "redirects both STDERR and STDOUT to the given file descriptior" do
380388
File.open(@name, 'w') do |file|
381389
lambda do

0 commit comments

Comments
 (0)
Please sign in to comment.