Registry / testing / assert-cmd

assert-cmd

JSON →
library2.2.2rscratesunverified

Test CLI applications by running them as subprocesses and asserting on their output and exit status.

# Cargo.toml [dependencies] assert_cmd = "2.2.2"
INSTALL
IMPORT
SIG · ASSERT-CMD
A
assert-cmd
testingrustv2.2.2
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Command
use assert_cmd::Command;

Runs a CLI binary and asserts that it succeeds and prints help text.

use assert_cmd::Command; let mut cmd = Command::cargo_bin("my_cli").unwrap(); let assert = cmd.arg("--help").assert(); assert.success().stdout(predicates::str::contains("Usage"));
Debug
Known issues

No known issues recorded.

Upgrade
Version history
2.2.2latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
25 hits · last 30 days
node
22
OpenAI (training)
1
Resources