Brandon Casey  committed 77b5be2

t/{t5541,lib-httpd}: replace problematic '!()' notation with test_must_fail

The '!()' notation is interpreted as a pattern-list on Ksh. The Ksh man
page describe it as follows:

Matches anything except one of the given patterns.

Ksh performs a file glob using the pattern-list and then tries to execute
the first file in the list. If a space is added between the '!' and the
open parens, then Ksh will not interpret it as a pattern list, but in this
case, it is preferred to use test_must_fail, so lets do so.

Signed-off-by: Brandon Casey <>
Signed-off-by: Junio C Hamano <>

  • Participants
  • Parent commits 460d562
  • Branches master

Comments (0)

Files changed (2)

File t/

 		echo "changed" > path2 &&
 		git commit -a -m path2 --amend &&
-		!(git push -v origin >output 2>&1) &&
+		test_must_fail git push -v origin >output 2>&1 &&
 		(cd "$REMOTE_REPO" &&
 		 test $HEAD = $(git rev-parse --verify HEAD))

File t/

 	# push master too; this ensures there is at least one '"'push'"' command to
 	# the remote helper and triggers interaction with the helper.
-	!(git push -v origin +master master:retsam >output 2>&1) &&
+	test_must_fail git push -v origin +master master:retsam >output 2>&1 &&
 	grep "^ + [a-f0-9]*\.\.\.[a-f0-9]* *master -> master (forced update)$" output &&
 	grep "^ ! \[rejected\] *master -> retsam (non-fast-forward)$" output &&