Add integration test skeleton
This commit is contained in:
parent
0ff3a4cf2e
commit
7a54776936
|
@ -0,0 +1,21 @@
|
||||||
|
// filename: tests/integration.rs
|
||||||
|
|
||||||
|
|
||||||
|
mod integration {
|
||||||
|
use std::process::Command;
|
||||||
|
|
||||||
|
static WITHOUT_ARGS_OUTPUT: &'static str = " USAGE:
|
||||||
|
carman [FLAGS] [OPTIONS] <URL>
|
||||||
|
For more information try --help
|
||||||
|
";
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn calling_carman_without_args() {
|
||||||
|
let output = Command::new("./target/debug/carman")
|
||||||
|
.output()
|
||||||
|
.expect("failed to execute process");
|
||||||
|
|
||||||
|
assert_eq!(String::from_utf8_lossy(&output.stderr), WITHOUT_ARGS_OUTPUT);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in New Issue