Closed
Description
The feature that captures "stdout" for tests doesn't capture all the ways that a test could print to stdout.
#[test]
fn output_capture_tests() {
println!("This gets captured...");
let _ = std::io::stdout().write_line("but this does not...");
let _ = std::task::try(proc() { println!("..and neither does this...") });
let _ = std::run::process_status("/bin/echo", [~"...nor this..."]);
fail!();
}
Only the first println!
call gets captured--the rest appear intermingled with the test output:
running 1 test
but this does not...
..and neither does this...
...nor this...
test output_capture_tests ... FAILED
failures:
---- output_capture_tests stdout ----
This gets captured...
task 'output_capture_tests' failed at 'explicit failure', subproc-test-stdout.rs:7
failures:
output_capture_tests
test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured
It would be nice if all of these got captured.