Skip to content

Commit

Permalink
Expect exit code 101 with stable rustc
Browse files Browse the repository at this point in the history
  • Loading branch information
fpoli committed Jul 27, 2018
1 parent dfa4c7c commit e03c9eb
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/runtest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -211,8 +211,12 @@ impl<'test> TestCx<'test> {

fn check_correct_failure_status(&self, proc_res: &ProcRes) {
// The value the rust runtime returns on failure
const RUST_ERR: i32 = 1;
if proc_res.status.code() != Some(RUST_ERR) {
let rust_err: i32 = if cfg!(feature = "stable") {
101
} else {
1
};
if proc_res.status.code() != Some(rust_err) {
self.fatal_proc_rec(
&format!("failure produced the wrong error: {}",
proc_res.status),
Expand Down

0 comments on commit e03c9eb

Please sign in to comment.