#[cfg(not(target_os = "windows"))] mod cli_integration_test {
use assert_cmd::cargo::cargo_bin_cmd;
use predicates::str::{is_empty, is_match, starts_with};
#[test]
fn test_version_subcommand() {
let mut command = cargo_bin_cmd!("cotp");
let assertion = command.arg("--version").assert();
assertion
.success()
.stdout(is_match("^cotp \\d+\\.\\d+\\.\\d+(?:-DEBUG-.+)?").unwrap())
.stderr(is_empty());
}
#[test]
fn test_help_subcommand() {
let mut command = cargo_bin_cmd!("cotp");
let assertion = command.arg("--help").assert();
assertion
.success()
.stdout(starts_with(
"Trustworthy, encrypted, command-line TOTP/HOTP authenticator app with import functionality.
Usage: cotp [OPTIONS] [COMMAND]",
))
.stderr(is_empty());
}
}