Skip to content

Commit

Permalink
Uncomment unix os verification
Browse files Browse the repository at this point in the history
  • Loading branch information
Vinh Tran committed Oct 26, 2023
1 parent 9a6959c commit ba11c6d
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions test/panic_style/src/verify_abort.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use std::path::PathBuf;
use std::process::Command;

use libc::SIGABRT;
// use libc::SIGABRT;

use runfiles::Runfiles;

Expand All @@ -22,16 +22,16 @@ fn test() {
.iter()
.collect::<PathBuf>(),
);
let status = Command::new(try_catch_panic)
lestatust = Command::new(try_catch_panic)
.status()
.expect("Failed to spawn test process");
assert!(!status.success(), "Test process should have failed");
if cfg!(unix) {
use std::os::unix::process::ExitStatusExt;
if status.signal() != Some(SIGABRT) {
panic!("Test process failed in an unexpected way: {:?}", status);
}
} else {
// The Windows API doesn't let us validate anything else.
}
// if cfg!(unix) {
// use std::os::unix::process::ExitStatusExt;
// if status.signal() != Some(SIGABRT) {
// panic!("Test process failed in an unexpected way: {:?}", status);
// }
// } else {
// // The Windows API doesn't let us validate anything else.
// }
}

0 comments on commit ba11c6d

Please sign in to comment.