diff options
| author | Paul Buetow <paul@buetow.org> | 2026-06-12 08:14:25 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-06-12 08:14:25 +0300 |
| commit | ebb307c24873863610815b59787de99e6b8c9fdb (patch) | |
| tree | aefcded06776155b65bf0bea96a9568259dab30d /tests/cli.sh | |
| parent | aff74bffb00f1be36f218db52dd76fd1fd8549f9 (diff) | |
Consolidate CLI option specs
Task: am0
Diffstat (limited to 'tests/cli.sh')
| -rwxr-xr-x | tests/cli.sh | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/tests/cli.sh b/tests/cli.sh index 66fdf82..4999580 100755 --- a/tests/cli.sh +++ b/tests/cli.sh @@ -3780,7 +3780,13 @@ test_extra_args_fail() { } test_missing_option_values_fail() { + local expected_argument local option + local output + local -A value_option_arguments=( + [--config]=path + [--sync-destination]=destination + ) local -a value_options=( --config --incoming @@ -3796,7 +3802,11 @@ test_missing_option_values_fail() { ) for option in "${value_options[@]}"; do - test::assert_failure "$option requires a value" "$TEST_SHURIKEN" "$option" + expected_argument="${value_option_arguments[$option]:-value}" + output=$(test::capture_failure_output "$TEST_SHURIKEN" "$option") + test::assert_contains \ + "Error: $option requires a $expected_argument" \ + "$output" done } |
