We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
assert_exit_code
1 parent 7786f7f commit 1912d56Copy full SHA for 1912d56
src/tools/run-make-support/src/command.rs
@@ -388,9 +388,15 @@ impl CompletedProcess {
388
self
389
}
390
391
+ /// Check the **exit status** of the process. On Unix, this is *not* the **wait status**.
392
+ ///
393
+ /// See [`std::process::ExitStatus::code`]. This is not to be confused with
394
+ /// [`std::process::ExitCode`].
395
#[track_caller]
396
pub fn assert_exit_code(&self, code: i32) -> &Self {
- assert!(self.output.status.code() == Some(code));
397
+ // FIXME(jieyouxu): this should really be named `exit_status`, because std has an `ExitCode`
398
+ // that means a different thing.
399
+ assert_eq!(self.output.status.code(), Some(code));
400
401
402
0 commit comments