From aad4d54fa81ee0d4f02e868f82ff4296e225791b Mon Sep 17 00:00:00 2001 From: Mischa POSLAWSKY Date: Mon, 9 Sep 2019 23:00:12 +0200 Subject: [PATCH] parse options to regress.t Reserve any parameters starting with a dash. Show usage for unknown commands ie everything. --- t/regress.t | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/t/regress.t b/t/regress.t index 5daf496..099b944 100755 --- a/t/regress.t +++ b/t/regress.t @@ -7,6 +7,13 @@ test_count=0 COLUMNS=40 diffcmd='diff --unchanged-line-format= --old-line-format=<%L --new-line-format=>%L' +for option in "$@" +do + case "$option" in + -*) echo "Usage: $0 [...]"; exit 64;; + esac +done + for candidate in ${@:-t*.in} do test_count=$((test_count+1)) -- 2.30.0