This repository was archived by the owner on Dec 29, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +41
-0
lines changed Expand file tree Collapse file tree 2 files changed +41
-0
lines changed Original file line number Diff line number Diff line change 22name = " assert_cli"
33version = " 0.1.0"
44authors = [" Pascal Hertleif <killercup@gmail.com>" ]
5+ repository = " https://github.com/killercup/assert_cli.git"
6+ homepage = " https://github.com/killercup/assert_cli"
7+ license = " MIT"
8+ readme = " README.md"
9+ documentation = " http://killercup.github.io/assert_cli/"
10+ description = " Test CLI Applications."
511
612[features ]
713default = []
Original file line number Diff line number Diff line change 1+ # Assert CLI
2+
3+ > Test CLI Applications.
4+
5+ Currently, this crate only includes basic functionality to check the output of a child process
6+ is as expected.
7+
8+ [ ![ Build Status] ( https://travis-ci.org/killercup/assert_cli.svg )] ( https://travis-ci.org/killercup/assert_cli ) [ ![ Coverage Status] ( https://coveralls.io/repos/killercup/assert_cli/badge.svg?branch=master&service=github )] ( https://coveralls.io/github/killercup/assert_cli?branch=master )
9+
10+ ## Example
11+
12+ Here's a trivial example:
13+
14+ ``` rust
15+ extern crate assert_cli;
16+ assert_cli :: assert_cli_output (" echo" , & [" 42" ], " 42" ). unwrap ();
17+ ```
18+
19+ And here is one that will fail:
20+
21+ ``` rust,should_panic
22+ extern crate assert_cli;
23+ assert_cli::assert_cli_output("echo", &["42"], "1337").unwrap();
24+ ```
25+
26+ this will show a nice, colorful diff in your terminal, like this:
27+
28+ ``` diff
29+ - 1337
30+ + 42
31+ ```
32+
33+ ## License
34+
35+ MIT
You can’t perform that action at this time.
0 commit comments