Skip to content

Commit f7db496

Browse files
committed
run-make-support: improve docs for assert_exit_code
1 parent b4742e4 commit f7db496

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/tools/run-make-support/src/command.rs

+7-1
Original file line numberDiff line numberDiff line change
@@ -333,9 +333,15 @@ impl CompletedProcess {
333333
self
334334
}
335335

336+
/// Check the **exit status** of the process. On Unix, this is *not* the **wait status**.
337+
///
338+
/// See [`std::process::ExitStatus::code`]. This is not to be confused with
339+
/// [`std::process::ExitCode`].
336340
#[track_caller]
337341
pub fn assert_exit_code(&self, code: i32) -> &Self {
338-
assert!(self.output.status.code() == Some(code));
342+
// FIXME(jieyouxu): this should really be named `exit_status`, because std has an `ExitCode`
343+
// that means a different thing.
344+
assert_eq!(self.output.status.code(), Some(code));
339345
self
340346
}
341347
}

0 commit comments

Comments
 (0)