[PATCH] tests: shell negation portability fix

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Commit 969c8775 introduced a test which uses the non-portable construct:

  command1 && ! command2 | command3

which must be

  command1 && ! (command2 | command3)

to work on bsd shells (this is another example of bbf08124, which fixed
several similar cases).

Signed-off-by: Jeff King <peff@xxxxxxxx>
---
I had totally forgotten about this monstrosity until my autobuild broke.

diff --git a/t/t4128-apply-root.sh b/t/t4128-apply-root.sh
index bc7a8a8..8f6aea4 100755
--- a/t/t4128-apply-root.sh
+++ b/t/t4128-apply-root.sh
@@ -72,7 +72,7 @@ test_expect_success 'apply --directory (delete file)' '
 	echo content >some/sub/dir/delfile &&
 	git add some/sub/dir/delfile &&
 	git apply --directory=some/sub/dir/ --index patch &&
-	! git ls-files | grep delfile
+	! (git ls-files | grep delfile)
 '
 
 cat > patch << 'EOF'
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux