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 b4742e4 commit f7db496Copy full SHA for f7db496
src/tools/run-make-support/src/command.rs
@@ -333,9 +333,15 @@ impl CompletedProcess {
333
self
334
}
335
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`].
340
#[track_caller]
341
pub fn assert_exit_code(&self, code: i32) -> &Self {
- 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));
345
346
347
0 commit comments