From: Mischa POSLAWSKY Date: Mon, 9 Sep 2019 21:00:12 +0000 (+0200) Subject: parse options to regress.t X-Git-Tag: v1.05~4 X-Git-Url: http://git.shiar.nl/barcat.git/commitdiff_plain/aad4d54fa81ee0d4f02e868f82ff4296e225791b parse options to regress.t Reserve any parameters starting with a dash. Show usage for unknown commands ie everything. --- 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))