cli-testing-specialist 1.0.10

Comprehensive testing framework for CLI tools - automated analysis, test generation, and security validation
Documentation
// Auto-generated tests for {{cli_name}} - Help Category
// Generated by cli-testing-specialist v1.1.0

use assert_cmd::Command;
use predicates::prelude::*;

/// Test: Main help displays subcommands
#[test]
fn test_help_shows_subcommands() {
    let mut cmd = Command::cargo_bin("{{cli_name}}").unwrap();
    cmd.arg("--help")
        .assert()
        .success()
        {{#each subcommands}}
        .stdout(predicate::str::contains("{{name}}"))
        {{/each}};
}

{{#each subcommands}}
/// Test: {{name}} subcommand help shows description
#[test]
fn test_subcommand_{{name}}_help_description() {
    let mut cmd = Command::cargo_bin("{{../cli_name}}").unwrap();
    cmd.arg("{{name}}")
        .arg("--help")
        .assert()
        .success()
        {{#if description}}
        .stdout(predicate::str::contains("{{description}}"));
        {{else}}
        .stdout(predicate::str::is_match("[Uu]sage:").unwrap());
        {{/if}}
}
{{/each}}