}
# top-level options
-test_success "explicit id" \
- --id hohoho \
+test_success "explicit name" \
+ --name hohoho \
--condition on-event some-event-id -u \
--action notify
--condition on-event bbb -u \
--action notify
-test_failure "missing argument to --id" \
- "Error: While parsing argument #1 (\`--id\`): Missing required argument for option \`--id\`" \
- --id
+test_failure "missing argument to --name" \
+ "Error: While parsing argument #1 (\`--name\`): Missing required argument for option \`--name\`" \
+ --name
for cmd in rate-policy=once-after rate-policy=every; do
test_failure "missing argument to --${cmd}" \
# `--condition` failures
test_failure "missing args after --condition" \
- "Error: Missing condition name." \
+ "Error: While parsing argument #1 (\`--condition\`): Missing required argument for option \`--condition\`" \
--condition
test_failure "unknown --condition" \
"Error: Unknown condition name 'zoofest'" \
# `--action` failures
test_failure "missing args after --action" \
- "Error: Missing action name." \
+ "Error: While parsing argument #1 (\`--action\`): Missing required argument for option \`--action\`" \
--condition on-event -u -a \
--action