]> git.lizzy.rs Git - rust.git/commitdiff
Fix RFC-1014 test
authorTomasz Miąsko <tomasz.miasko@gmail.com>
Sat, 15 Aug 2020 00:00:00 +0000 (00:00 +0000)
committerTomasz Miąsko <tomasz.miasko@gmail.com>
Sat, 15 Aug 2020 00:00:00 +0000 (00:00 +0000)
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
src/test/ui/rfcs/rfc-1014.rs

index 5be092204d7c0c5e0ee23ff037c7c91b94272dd7..7dd65701f125c135af39103b7484f6104a77dd43 100644 (file)
@@ -23,7 +23,8 @@ fn close_stdout() {
 #[cfg(windows)]
 fn main() {
     close_stdout();
-    println!("hello world");
+    println!("hello");
+    println!("world");
 }
 
 #[cfg(not(windows))]
index 41a036958bfeab27fbda9acb11d285694a098e9f..53b8fddcf31e0b64001f1262efc953d621b252b0 100644 (file)
@@ -30,5 +30,6 @@ fn close_stdout() {
 
 fn main() {
     close_stdout();
-    println!("hello world");
+    println!("hello");
+    println!("world");
 }