Skip to content

MrJohz/assert_cli

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Assert CLI

Test CLI Applications.

Currently, this crate only includes basic functionality to check the output of a child process is as expected.

Build Status Coverage Status

Install

Just add it to your Cargo.toml:

[dependencies]
assert_cli = "0.1.0"

Example

Here's a trivial example:

extern crate assert_cli;
assert_cli::assert_cli_output("echo", &["42"], "42").unwrap();

And here is one that will fail:

extern crate assert_cli;
assert_cli::assert_cli_output("echo", &["42"], "1337").unwrap();

this will show a nice, colorful diff in your terminal, like this:

-1337
+42

License

MIT

About

Test CLI Applications in Rust.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Rust 100.0%