From fa8d396d58366f62049c0df622dd09897966ed13 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tomasz=20Mi=C4=85sko?= Date: Sat, 15 Aug 2020 00:00:00 +0000 Subject: [PATCH] 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. --- src/test/ui/rfcs/rfc-1014-2.rs | 3 ++- src/test/ui/rfcs/rfc-1014.rs | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/test/ui/rfcs/rfc-1014-2.rs b/src/test/ui/rfcs/rfc-1014-2.rs index 5be092204d7..7dd65701f12 100644 --- a/src/test/ui/rfcs/rfc-1014-2.rs +++ b/src/test/ui/rfcs/rfc-1014-2.rs @@ -23,7 +23,8 @@ fn close_stdout() { #[cfg(windows)] fn main() { close_stdout(); - println!("hello world"); + println!("hello"); + println!("world"); } #[cfg(not(windows))] diff --git a/src/test/ui/rfcs/rfc-1014.rs b/src/test/ui/rfcs/rfc-1014.rs index 41a036958bf..53b8fddcf31 100644 --- a/src/test/ui/rfcs/rfc-1014.rs +++ b/src/test/ui/rfcs/rfc-1014.rs @@ -30,5 +30,6 @@ fn close_stdout() { fn main() { close_stdout(); - println!("hello world"); + println!("hello"); + println!("world"); } -- 2.44.0