28 lines
942 B
Rust
28 lines
942 B
Rust
//! Integration tests for the `asmflow` command.
|
|
|
|
use assert_cmd::Command;
|
|
use predicates::prelude::*;
|
|
|
|
#[test]
|
|
fn no_args_prints_quick_help_card() {
|
|
let mut command = Command::cargo_bin("asmflow").expect("binary");
|
|
command
|
|
.assert()
|
|
.code(2)
|
|
.stdout(predicate::str::is_empty())
|
|
.stderr(predicate::str::contains(
|
|
"error: missing subcommand; expected find, body, or xref",
|
|
))
|
|
.stderr(predicate::str::contains("asmflow - Mercury Toolbox"))
|
|
.stderr(predicate::str::contains("Usage:"))
|
|
.stderr(predicate::str::contains(
|
|
"asmflow [OPTIONS] <SUBCOMMAND> [ARGS...]",
|
|
))
|
|
.stderr(predicate::str::contains("find"))
|
|
.stderr(predicate::str::contains("body"))
|
|
.stderr(predicate::str::contains("xref"))
|
|
.stderr(predicate::str::contains(
|
|
"Type 'asmflow --help' for the full command reference.",
|
|
));
|
|
}
|