about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorTomasz Miąsko <tomasz.miasko@gmail.com>2020-08-15 00:00:00 +0000
committerTomasz Miąsko <tomasz.miasko@gmail.com>2020-08-15 00:00:00 +0000
commitfa8d396d58366f62049c0df622dd09897966ed13 (patch)
treeafe8cd01ca4748471127a183b52c386c905bee4e /src
parent55b9adfafa11b2ced5c0477c949fd875b19b3877 (diff)
downloadrust-fa8d396d58366f62049c0df622dd09897966ed13.tar.gz
rust-fa8d396d58366f62049c0df622dd09897966ed13.zip
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.
Diffstat (limited to 'src')
-rw-r--r--src/test/ui/rfcs/rfc-1014-2.rs3
-rw-r--r--src/test/ui/rfcs/rfc-1014.rs3
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");
 }