t: fix severe &&-chain breakage
authorJeff King <peff@peff.net>
Fri, 20 Mar 2015 10:06:15 +0000 (06:06 -0400)
committerJunio C Hamano <gitster@pobox.com>
Fri, 20 Mar 2015 17:20:13 +0000 (10:20 -0700)
These are tests which are missing a link in their &&-chain,
in a location which causes a significant portion of the test
to be missed (e.g., the test effectively does nothing, or
consists of a long string of actions and output comparisons,
and we throw away the exit code of at least one part of the
string).

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 files changed:
t/t1300-repo-config.sh
t/t1403-show-ref.sh
t/t1700-split-index.sh
t/t3600-rm.sh
t/t4047-diff-dirstat.sh
t/t4104-apply-boundary.sh
t/t4202-log.sh
t/t5100-mailinfo.sh
t/t5510-fetch.sh
t/t5540-http-push-webdav.sh
t/t5551-http-fetch-smart.sh
t/t6036-recursive-corner-cases.sh
t/t9300-fast-import.sh
t/t9902-completion.sh
index 938fc8bfd76c9889ebb2129642f878c9449acc9f..bc0b392a0ec19987beb12f1270d20a853880d06c 100755 (executable)
@@ -677,7 +677,7 @@ test_expect_success 'invalid unit' '
        echo 1auto >expect &&
        git config aninvalid.unit >actual &&
        test_cmp expect actual &&
-       cat >expect <<-\EOF
+       cat >expect <<-\EOF &&
        fatal: bad numeric config value '\''1auto'\'' for '\''aninvalid.unit'\'' in .git/config: invalid unit
        EOF
        test_must_fail git config --int --get aninvalid.unit 2>actual &&
index 3e500ed7da6e366ec046a778b82d70238ce23294..7e10bcfe395609cff5edc1f8f6ce95fcf69cf5f6 100755 (executable)
@@ -28,7 +28,7 @@ test_expect_success 'show-ref' '
 
        >expect &&
 
-       test_must_fail git show-ref D >actual
+       test_must_fail git show-ref D >actual &&
        test_cmp expect actual
 '
 
@@ -62,7 +62,7 @@ test_expect_success 'show-ref --verify' '
        test_must_fail git show-ref --verify tags/A >actual &&
        test_cmp expect actual &&
 
-       test_must_fail git show-ref --verify D >actual
+       test_must_fail git show-ref --verify D >actual &&
        test_cmp expect actual
 '
 
@@ -78,7 +78,7 @@ test_expect_success 'show-ref --verify -q' '
        test_must_fail git show-ref --verify -q tags/A >actual &&
        test_cmp expect actual &&
 
-       test_must_fail git show-ref --verify -q D >actual
+       test_must_fail git show-ref --verify -q D >actual &&
        test_cmp expect actual
 '
 
@@ -105,10 +105,10 @@ test_expect_success 'show-ref -d' '
        test_cmp expect actual &&
 
        git show-ref -d refs/heads/master >actual &&
-       test_cmp expect actual
+       test_cmp expect actual &&
 
        git show-ref -d --verify refs/heads/master >actual &&
-       test_cmp expect actual
+       test_cmp expect actual &&
 
        >expect &&
 
index 94fb473e7c309b823a9abdc1e7c38b1299bf80f3..a55f5bc0a1b566b7467a728804150f702fe09d96 100755 (executable)
@@ -182,7 +182,7 @@ test_expect_success 'unify index, two files remain' '
 100644 e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 0      one
 100644 e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 0      two
 EOF
-       test_cmp ls-files.expect ls-files.actual
+       test_cmp ls-files.expect ls-files.actual &&
 
        test-dump-split-index .git/index | sed "/^own/d" >actual &&
        cat >expect <<EOF &&
index e00d7d2b6186023642bc9d0b5d5dd6a526278767..b0db89b734885659ac21efb2cbc6c41b834082db 100755 (executable)
@@ -170,7 +170,7 @@ test_expect_success 'but with -f it should work.' '
        git rm -f foo baz &&
        test ! -f foo &&
        test ! -f baz &&
-       test_must_fail git ls-files --error-unmatch foo
+       test_must_fail git ls-files --error-unmatch foo &&
        test_must_fail git ls-files --error-unmatch baz
 '
 
index 0d50dce97e86a26bac7c798f020a1807936cc3c3..3b8b7921d60c75c7fa8670cef7049564d92c77b6 100755 (executable)
@@ -374,7 +374,7 @@ test_expect_success 'later options override earlier options:' '
        git diff --dirstat=files,10,cumulative,changes,noncumulative,3 -M HEAD^..HEAD >actual_diff_dirstat_M &&
        test_cmp expect_diff_dirstat_M actual_diff_dirstat_M &&
        git diff --dirstat=files,10,cumulative,changes,noncumulative,3 -C -C HEAD^..HEAD >actual_diff_dirstat_CC &&
-       test_cmp expect_diff_dirstat_CC actual_diff_dirstat_CC
+       test_cmp expect_diff_dirstat_CC actual_diff_dirstat_CC &&
        git diff --dirstat=files --dirstat=10 --dirstat=cumulative --dirstat=changes --dirstat=noncumulative -X3 HEAD^..HEAD >actual_diff_dirstat &&
        test_cmp expect_diff_dirstat actual_diff_dirstat &&
        git diff --dirstat=files --dirstat=10 --dirstat=cumulative --dirstat=changes --dirstat=noncumulative -X3 -M HEAD^..HEAD >actual_diff_dirstat_M &&
index c617c2a33d8e8ac1dc7e049f9056ca6025fbf852..c97aad186ea295bd187797788e983a6bd6899ed8 100755 (executable)
@@ -78,8 +78,8 @@ test_expect_success setup '
                echo $i
        done >victim &&
        cat victim >del-z-expect &&
-       git diff victim >del-z-patch.with
-       git diff --unified=0 >del-z-patch.without &&
+       git diff victim >del-z-patch.with &&
+       git diff --unified=0 >del-z-patch.without
 
        : done
 '
index 5f2b290d2b803a4af971a1c03021e97a16951847..a22ac7c75a6d8b75db6b1e5b5e40c7e8a5ac217b 100755 (executable)
@@ -481,7 +481,7 @@ test_expect_success 'log.decorate configuration' '
        git log --oneline --no-decorate >actual &&
        test_cmp expect.none actual &&
        git log --oneline --decorate >actual &&
-       test_cmp expect.short actual
+       test_cmp expect.short actual &&
 
        test_unconfig log.decorate &&
        git log --pretty=raw >expect.raw &&
index 60df10f46a52ea4ea33eded268beddc13fec29ea..e97cfb2ab838fc9d9ecf1a7d207d6316e11a63f5 100755 (executable)
@@ -34,7 +34,7 @@ do
                if test -f "$TEST_DIRECTORY"/t5100/msg$mail--no-inbody-headers
                then
                        check_mailinfo $mail --no-inbody-headers
-               fi
+               fi &&
                if test -f "$TEST_DIRECTORY"/t5100/msg$mail--message-id
                then
                        check_mailinfo $mail --message-id
index d78f3201f423504bf5d53029492cc1bc056aab06..d3fa2c9617eefa0fd8a34fe0e7d9bfffd439c6bd 100755 (executable)
@@ -124,7 +124,7 @@ test_expect_success 'fetch --prune handles overlapping refspecs' '
        git rev-parse origin/master &&
        git rev-parse origin/pr/42 &&
 
-       git config --unset-all remote.origin.fetch
+       git config --unset-all remote.origin.fetch &&
        git config remote.origin.fetch refs/pull/*/head:refs/remotes/origin/pr/* &&
        git config --add remote.origin.fetch refs/heads/*:refs/remotes/origin/* &&
 
index 8d7b3c57e31dd3bc76df3124c31351862e9fb811..88ff5a49e4af38daca65c6e3a79ea4030b391c6b 100755 (executable)
@@ -169,7 +169,7 @@ test_expect_failure 'push to password-protected repository (no user in URL)' '
        test_commit pw-nouser &&
        set_askpass user@host pass@host &&
        git push "$HTTPD_URL/auth/dumb/test_repo.git" HEAD &&
-       expect_askpass both user@host
+       expect_askpass both user@host &&
        git rev-parse --verify HEAD >expect &&
        git --git-dir="$HTTPD_DOCUMENT_ROOT_PATH/auth/dumb/test_repo.git" \
                rev-parse --verify HEAD >actual &&
index 6cbc12d9a7ad059f77967c0bdb702d8a5ec75bb9..eae20d92ff06a21e431dee5701ad42c65d8de4c8 100755 (executable)
@@ -169,7 +169,7 @@ test_expect_success 'GIT_SMART_HTTP can disable smart http' '
 '
 
 test_expect_success 'invalid Content-Type rejected' '
-       test_must_fail git clone $HTTPD_URL/broken_smart/repo.git 2>actual
+       test_must_fail git clone $HTTPD_URL/broken_smart/repo.git 2>actual &&
        grep "not valid:" actual
 '
 
index a86087be955a65d62a596f10cdbac1b6669cf2db..b43d031d63924464efc62c89d0ce0da017f762b1 100755 (executable)
@@ -533,7 +533,7 @@ test_expect_success 'merge of E2 & D fails but has appropriate contents' '
 
        test $(git rev-parse :3:a) = $(git rev-parse B:a) &&
        test $(git rev-parse :2:a/file) = $(git rev-parse E2:a/file) &&
-       test $(git rev-parse :1:a/file) = $(git rev-parse C:a/file)
+       test $(git rev-parse :1:a/file) = $(git rev-parse C:a/file) &&
        test $(git rev-parse :0:ignore-me) = $(git rev-parse A:ignore-me) &&
 
        test -f a~D^0
index c538e0a4e97c942dcb64b3e5bdd9afa10591f33e..6bd5a005ecb46f5e72fb257988236e75cdcd49e5 100755 (executable)
@@ -2228,7 +2228,7 @@ test_expect_success 'R: feature import-marks-if-exists' '
        >expect &&
 
        git fast-import --import-marks-if-exists=not_io.marks \
-                       --export-marks=io.marks <<-\EOF
+                       --export-marks=io.marks <<-\EOF &&
        feature import-marks-if-exists=io.marks
        EOF
        test_cmp expect io.marks
index 7a883d1a674dbed174611470c93ffe32f4f8a4bc..4a14a5892e9ac06c967e17a4db68e57b06313c18 100755 (executable)
@@ -568,7 +568,7 @@ test_expect_success 'complete files' '
        test_completion "git commit " "modified" &&
 
        : TODO .gitignore should not be here &&
-       test_completion "git ls-files " <<-\EOF
+       test_completion "git ls-files " <<-\EOF &&
        .gitignore
        dir
        modified