Skip to content
This repository has been archived by the owner on Dec 29, 2021. It is now read-only.

fix(output): Re-work API to work with rustfmt #74

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,20 +37,20 @@ fn main() {
assert_cli::Assert::command(&["ls", "foo-bar-foo"])
.fails()
.and()
.stderr().contains("foo-bar-foo")
.stderr(assert_cli::Output::contains("foo-bar-foo"))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd probably use assert_cli::{Assert, Output}; in most examples.

.unwrap();
}
```

If you want to match the program's output _exactly_, you can use
`stdout().is` (and shows the macro form of `command`):
`Output::is` (and shows the macro form of `command`):

```rust,should_panic
#[macro_use] extern crate assert_cli;

fn main() {
assert_cmd!(wc "README.md")
.stdout().is("1337 README.md")
.stdout(assert_cli::Output::is("1337 README.md"))
.unwrap();
}
```
Expand Down
Loading