Skip to content

Commit

Permalink
another test
Browse files Browse the repository at this point in the history
  • Loading branch information
danreeves committed Oct 10, 2018
1 parent 51942aa commit 7dce324
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions tests/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,16 @@ fn it_returns_the_exit_code_of_the_command_when_it_fails() {
.contains("> exit 42")
.unwrap();
}

#[test]
fn it_passes_extra_arguments_to_the_command() {
assert_cli::Assert::main_binary()
.with_args(&["cmd", "echo", "hello planet"])
.succeeds()
.and()
.stdout()
// This is both the printout of the command being executed
// and the output itself
.contains("> echo hello planet\nhello planet")
.unwrap();
}

0 comments on commit 7dce324

Please sign in to comment.