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:
parent
7eaa6ec8f7
commit
0cc392e5fa
1 changed files with 2 additions and 5 deletions
|
@ -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 @@ use std::process::{Command, Stdio};
|
|||
|
||||
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());
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue