Fix RFC-1014 test

Use two printlns when testing that writing to a closed stdout does not
panic. Otherwise the test is ineffective, since the current implementation
silently ignores the error during first println regardless.
This commit is contained in:
Tomasz Miąsko 2020-08-15 00:00:00 +00:00
parent 55b9adfafa
commit fa8d396d58
2 changed files with 4 additions and 2 deletions

View file

@ -23,7 +23,8 @@ fn close_stdout() {
#[cfg(windows)]
fn main() {
close_stdout();
println!("hello world");
println!("hello");
println!("world");
}
#[cfg(not(windows))]

View file

@ -30,5 +30,6 @@ fn close_stdout() {
fn main() {
close_stdout();
println!("hello world");
println!("hello");
println!("world");
}