Code

test-lib: fail if invalid options are passed
authorClemens Buchacher <drizzd@aon.at>
Mon, 1 Jun 2009 12:14:40 +0000 (14:14 +0200)
committerJunio C Hamano <gitster@pobox.com>
Tue, 2 Jun 2009 05:44:51 +0000 (22:44 -0700)
Previously, unknown options would be ignored, including any subsequent
valid options.

Signed-off-by: Clemens Buchacher <drizzd@aon.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/test-lib.sh

index dad1437fa49596cf6f36b40b1ab18b008620a246..6e83ceb3606c705fa4b4f5fe7e31636fe4d47444 100644 (file)
@@ -115,7 +115,7 @@ do
        --tee)
                shift ;; # was handled already
        *)
-               break ;;
+               echo "error: unknown test option '$1'" >&2; exit 1 ;;
        esac
 done