diff --git a/tests/integration.rs b/tests/integration.rs new file mode 100644 index 0000000..659306e --- /dev/null +++ b/tests/integration.rs @@ -0,0 +1,21 @@ +// filename: tests/integration.rs + + +mod integration { + use std::process::Command; + + static WITHOUT_ARGS_OUTPUT: &'static str = " USAGE: + carman [FLAGS] [OPTIONS] + 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); + } + +}