-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Adds pretty_assertions as dev-dependency for easy cli-diff-tests-results visualization
- Loading branch information
1 parent
46fd3a4
commit f5d8683
Showing
2 changed files
with
32 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
use pretty_assertions::assert_eq; | ||
use std::env; | ||
use tokio::process::Command; | ||
|
||
const TRUSTIFY_CLI_HELP: &str = "huevos | ||
Usage: trustify-cli <COMMAND> | ||
Commands: | ||
importer | ||
server Run the API server | ||
help Print this message or the help of the given subcommand(s) | ||
Options: | ||
-h, --help Print help | ||
-V, --version Print version | ||
"; | ||
|
||
#[tokio::test] | ||
async fn trustify_cli_help() { | ||
let output = Command::new(env!("CARGO_BIN_EXE_trustify-cli")) | ||
.output() | ||
.await | ||
.expect(""); | ||
|
||
let output_str = String::from_utf8_lossy(&output.stderr).to_string(); | ||
assert_eq!(TRUSTIFY_CLI_HELP, output_str); | ||
} |