Add integration test skeleton

This commit is contained in:
Arnaud (Arhuman) ASSAD 2022-05-06 04:29:22 +02:00
parent 0ff3a4cf2e
commit 7a54776936
1 changed files with 21 additions and 0 deletions

21
tests/integration.rs Normal file
View File

@ -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);
}
}