git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 1/3] test-lib: fail if invalid options are passed

From
Clemens Buchacher <drizzd@aon.at>
Date
Jun 1, 2009, 12:14 UTC
Message-ID
<1243858482-6353-2-git-send-email-drizzd@aon.at>
In-Reply-To
<1243858482-6353-1-git-send-email-drizzd@aon.at>

Previously, unknown options would be ignored, including any subsequent valid options.

Signed-off-by: Clemens Buchacher <drizzd@aon.at>
---
 t/test-lib.sh |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/t/test-lib.sh b/t/test-lib.sh
index dad1437..6e83ceb 100644
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
@@ -115,7 +115,7 @@ do
 	--tee)
 		shift ;; # was handled already
 	*)
-		break ;;
+		echo "error: unknown test option '$1'" >&2; exit 1 ;;
 	esac
 done
 
-- 
1.6.3.1.147.g637c3
Previous: Clemens BuchacherNext: Clemens Buchacher
Message 2 of 5 in “various fixes to the test library”
  1. Clemens BuchacherJun 1, 2009
  2. 1/3 test-lib: fail if invalid options are passedClemens Buchacher, Jun 1, 2009
  3. 2/3 test-lib: allow exit trap to be used for cleanup by testsClemens Buchacher, Jun 1, 2009
  4. 3/3 test-lib: fix http exit codesClemens Buchacher, Jun 1, 2009
  5. Clemens BuchacherJun 1, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.