mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-27 18:57:42 +03:00
tests: cleanup tests/ui/process/sigpipe-should-be-ignored.rs
- Unwrap a must-use I/O result and remove `#![allow(unused_must_use)]`. - Replace `ignore-*` with `needs-subprocess`.
This commit is contained in:
@@ -1,12 +1,9 @@
|
||||
//@ run-pass
|
||||
//@ needs-subprocess
|
||||
|
||||
#![allow(unused_must_use)]
|
||||
// Be sure that when a SIGPIPE would have been received that the entire process
|
||||
// doesn't die in a ball of fire, but rather it's gracefully handled.
|
||||
|
||||
//@ ignore-wasm32 no processes
|
||||
//@ ignore-sgx no processes
|
||||
|
||||
use std::env;
|
||||
use std::io::prelude::*;
|
||||
use std::io;
|
||||
@@ -14,7 +11,7 @@
|
||||
|
||||
fn test() {
|
||||
let _ = io::stdin().read_line(&mut String::new());
|
||||
io::stdout().write(&[1]);
|
||||
io::stdout().write(&[1]).unwrap();
|
||||
assert!(io::stdout().flush().is_err());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user