diff options
author | Jeff King <peff@peff.net> | 2008-05-14 00:01:22 -0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2008-05-13 21:44:48 -0700 |
commit | bbf08124e0a87658a76b53a05d67227fa3b4e7b9 (patch) | |
tree | e3eb0c8faee5837f0f0eefb8f831c068f67a2705 /t | |
parent | 64c0d71ce91696dfe5beb4b51e3233e56c857290 (diff) | |
download | git-bbf08124e0a87658a76b53a05d67227fa3b4e7b9.tar.gz git-bbf08124e0a87658a76b53a05d67227fa3b4e7b9.tar.xz |
fix bsd shell negation
On some shells (notably /bin/sh on FreeBSD 6.1), the
construct
foo && ! bar | baz
is true if
foo && baz
whereas for most other shells (such as bash) is true if
foo && ! baz
We can work around this by specifying
foo && ! (bar | baz)
which works everywhere.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't')
-rwxr-xr-x | t/t3400-rebase.sh | 4 | ||||
-rwxr-xr-x | t/t3700-add.sh | 6 | ||||
-rwxr-xr-x | t/t5302-pack-index.sh | 2 | ||||
-rwxr-xr-x | t/t7501-commit.sh | 2 |
4 files changed, 7 insertions, 7 deletions
diff --git a/t/t3400-rebase.sh b/t/t3400-rebase.sh index 496f4ec17..fdad7dad6 100755 --- a/t/t3400-rebase.sh +++ b/t/t3400-rebase.sh @@ -44,13 +44,13 @@ test_expect_success 'rebase against master' ' test_expect_success \ 'the rebase operation should not have destroyed author information' \ - '! git log | grep "Author:" | grep "<>"' + '! (git log | grep "Author:" | grep "<>")' test_expect_success 'rebase after merge master' ' git reset --hard topic && git merge master && git rebase master && - ! git show | grep "^Merge:" + ! (git show | grep "^Merge:") ' test_expect_success 'rebase of history with merges is linearized' ' diff --git a/t/t3700-add.sh b/t/t3700-add.sh index 287e058e3..68c5ddebd 100755 --- a/t/t3700-add.sh +++ b/t/t3700-add.sh @@ -81,17 +81,17 @@ test_expect_success '.gitignore test setup' ' test_expect_success '.gitignore is honored' ' git add . && - ! git ls-files | grep "\\.ig" + ! (git ls-files | grep "\\.ig") ' test_expect_success 'error out when attempting to add ignored ones without -f' ' ! git add a.?? && - ! git ls-files | grep "\\.ig" + ! (git ls-files | grep "\\.ig") ' test_expect_success 'error out when attempting to add ignored ones without -f' ' ! git add d.?? && - ! git ls-files | grep "\\.ig" + ! (git ls-files | grep "\\.ig") ' test_expect_success 'add ignored ones with -f' ' diff --git a/t/t5302-pack-index.sh b/t/t5302-pack-index.sh index b88b5bbd0..09fd91767 100755 --- a/t/t5302-pack-index.sh +++ b/t/t5302-pack-index.sh @@ -65,7 +65,7 @@ test_expect_success \ have_64bits= if msg=$(git verify-pack -v "test-3-${pack3}.pack" 2>&1) || - ! echo "$msg" | grep "pack too large .* off_t" + ! (echo "$msg" | grep "pack too large .* off_t") then have_64bits=t else diff --git a/t/t7501-commit.sh b/t/t7501-commit.sh index c0288f345..89710afcb 100755 --- a/t/t7501-commit.sh +++ b/t/t7501-commit.sh @@ -41,7 +41,7 @@ test_expect_success \ test_expect_success \ "using paths with --interactive" \ "echo bong-o-bong >file && - ! echo 7 | git-commit -m foo --interactive file" + ! (echo 7 | git-commit -m foo --interactive file)" test_expect_success \ "using invalid commit with -C" \ |