From 76975658a759e502063b03d36cd33bbe6ce555c3 Mon Sep 17 00:00:00 2001 From: Tobias Kaupat Date: Sun, 18 Oct 2026 10:16:59 +0200 Subject: [PATCH] fix: reject --suite without a value instead of running all suites Co-Authored-By: Claude Sonnet 5.5 --- test/run.sh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/test/run.sh b/test/run.sh index 0cba1a6..82dca37 100644 --- a/test/run.sh +++ b/test/run.sh @@ -36,8 +36,15 @@ while [ $# -gt 0 ]; do case "$1" in --no-build) BUILD=0 ;; --sabotage) SABOTAGE=1 ;; - --suite) ONLY_SUITE="${2:-}"; shift ;; - --suite=*) ONLY_SUITE="${1#--suite=}" ;; + --suite) + # A missing value, or a following flag, must not be taken as one. + case "${2:-}" in + ""|-*) echo "--suite requires a value (compat|features|structure)" >&2; exit 2 ;; + esac + ONLY_SUITE="$2"; shift ;; + --suite=*) + ONLY_SUITE="${1#--suite=}" + [ -n "$ONLY_SUITE" ] || { echo "--suite requires a value (compat|features|structure)" >&2; exit 2; } ;; -h|--help) sed -n '2,14p' "$0" | sed 's/^# \{0,1\}//'; exit 0 ;; *) echo "unknown argument: $1" >&2; exit 2 ;; esac