Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ailoop-cli/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ enum AuthorizeDefault {
#[command(version)]
#[command(about = "Human-in-the-Loop CLI Tool for AI Agent Communication")]
#[command(
help_template = "{name} - {version}\n{about}\n\n{usage-heading}\n {usage}\n\n{all-args}{options}\n"
help_template = "{name} - {version}\n{about}\n\n{usage-heading}\n {usage}\n\n{all-args}\n"
)]
struct Cli {
#[command(subcommand)]
Expand Down
17 changes: 17 additions & 0 deletions ailoop-cli/tests/cli_snapshot_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,23 @@ fn test_help_shows_commands() {
}
}

#[test]
fn test_help_no_duplicate_options() {
let help_text = get_help_text().expect("Failed to get help text");
let count = help_text.matches("-h, --help").count();
assert_eq!(
count, 1,
"'-h, --help' MUST appear exactly once in help output, found {} times\nActual:\n{}",
count, help_text
);
let count_v = help_text.matches("-V, --version").count();
assert_eq!(
count_v, 1,
"'-V, --version' MUST appear exactly once in help output, found {} times\nActual:\n{}",
count_v, help_text
);
}

#[test]
fn test_task_help_shows_subcommands() {
let help_text =
Expand Down
2 changes: 1 addition & 1 deletion ailoop-py/uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading