MCPcopy Index your code
hub / github.com/assert-rs/assert_cmd / OutputAssertExt

Interface OutputAssertExt

src/assert.rs:33–52  ·  view source on GitHub ↗

Assert the state of an [`Output`]. # Examples ```rust,no_run use assert_cmd::prelude::*; use std::process::Command; let mut cmd = Command::cargo_bin("bin_fixture") .unwrap(); cmd.assert() .success(); ``` [`Output`]: std::process::Output

Source from the content-addressed store, hash-verified

31///
32/// [`Output`]: std::process::Output
33pub trait OutputAssertExt {
34 /// Wrap with an interface for that provides assertions on the [`Output`].
35 ///
36 /// # Examples
37 ///
38 /// ```rust,no_run
39 /// use assert_cmd::prelude::*;
40 ///
41 /// use std::process::Command;
42 ///
43 /// let mut cmd = Command::cargo_bin("bin_fixture")
44 /// .unwrap();
45 /// cmd.assert()
46 /// .success();
47 /// ```
48 ///
49 /// [`Output`]: std::process::Output
50 #[must_use]
51 fn assert(self) -> Assert;
52}
53
54impl OutputAssertExt for process::Output {
55 fn assert(self) -> Assert {

Callers

nothing calls this directly

Implementers 2

cmd.rssrc/cmd.rs
assert.rssrc/assert.rs

Calls

no outgoing calls

Tested by

no test coverage detected