t: fix severe &&-chain breakage

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>

Jeff King committed Mar 20, 2015 at 06:06 UTC 8fb268720e8565885039e7491f4628974e2d66a2
14 files changed +19 -19
t/t1300-repo-config.sh
+1 -1
@@ -677,7 +677,7 @@ test_expect_success 'invalid unit' '
677 echo 1auto >expect &&
678 git config aninvalid.unit >actual &&
679 test_cmp expect actual &&
680 - cat >expect <<-\EOF
680 + cat >expect <<-\EOF &&
681 fatal: bad numeric config value '\''1auto'\'' for '\''aninvalid.unit'\'' in .git/config: invalid unit
682 EOF
683 test_must_fail git config --int --get aninvalid.unit 2>actual &&
t/t1403-show-ref.sh
+5 -5
@@ -28,7 +28,7 @@ test_expect_success 'show-ref' '
28
29 >expect &&
30
31 - test_must_fail git show-ref D >actual
31 + test_must_fail git show-ref D >actual &&
32 test_cmp expect actual
33 '
34
@@ -62,7 +62,7 @@ test_expect_success 'show-ref --verify' '
62 test_must_fail git show-ref --verify tags/A >actual &&
63 test_cmp expect actual &&
64
65 - test_must_fail git show-ref --verify D >actual
65 + test_must_fail git show-ref --verify D >actual &&
66 test_cmp expect actual
67 '
68
@@ -78,7 +78,7 @@ test_expect_success 'show-ref --verify -q' '
78 test_must_fail git show-ref --verify -q tags/A >actual &&
79 test_cmp expect actual &&
80
81 - test_must_fail git show-ref --verify -q D >actual
81 + test_must_fail git show-ref --verify -q D >actual &&
82 test_cmp expect actual
83 '
84
@@ -105,10 +105,10 @@ test_expect_success 'show-ref -d' '
105 test_cmp expect actual &&
106
107 git show-ref -d refs/heads/master >actual &&
108 - test_cmp expect actual
108 + test_cmp expect actual &&
109
110 git show-ref -d --verify refs/heads/master >actual &&
111 - test_cmp expect actual
111 + test_cmp expect actual &&
112
113 >expect &&
114
t/t1700-split-index.sh
+1 -1
@@ -182,7 +182,7 @@ test_expect_success 'unify index, two files remain' '
182 100644 e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 0 one
183 100644 e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 0 two
184 EOF
185 - test_cmp ls-files.expect ls-files.actual
185 + test_cmp ls-files.expect ls-files.actual &&
186
187 test-dump-split-index .git/index | sed "/^own/d" >actual &&
188 cat >expect <<EOF &&
t/t3600-rm.sh
+1 -1
@@ -170,7 +170,7 @@ test_expect_success 'but with -f it should work.' '
170 git rm -f foo baz &&
171 test ! -f foo &&
172 test ! -f baz &&
173 - test_must_fail git ls-files --error-unmatch foo
173 + test_must_fail git ls-files --error-unmatch foo &&
174 test_must_fail git ls-files --error-unmatch baz
175 '
176
t/t4047-diff-dirstat.sh
+1 -1
@@ -374,7 +374,7 @@ test_expect_success 'later options override earlier options:' '
374 git diff --dirstat=files,10,cumulative,changes,noncumulative,3 -M HEAD^..HEAD >actual_diff_dirstat_M &&
375 test_cmp expect_diff_dirstat_M actual_diff_dirstat_M &&
376 git diff --dirstat=files,10,cumulative,changes,noncumulative,3 -C -C HEAD^..HEAD >actual_diff_dirstat_CC &&
377 - test_cmp expect_diff_dirstat_CC actual_diff_dirstat_CC
377 + test_cmp expect_diff_dirstat_CC actual_diff_dirstat_CC &&
378 git diff --dirstat=files --dirstat=10 --dirstat=cumulative --dirstat=changes --dirstat=noncumulative -X3 HEAD^..HEAD >actual_diff_dirstat &&
379 test_cmp expect_diff_dirstat actual_diff_dirstat &&
380 git diff --dirstat=files --dirstat=10 --dirstat=cumulative --dirstat=changes --dirstat=noncumulative -X3 -M HEAD^..HEAD >actual_diff_dirstat_M &&
t/t4104-apply-boundary.sh
+2 -2
@@ -78,8 +78,8 @@ test_expect_success setup '
78 echo $i
79 done >victim &&
80 cat victim >del-z-expect &&
81 - git diff victim >del-z-patch.with
82 - git diff --unified=0 >del-z-patch.without &&
81 + git diff victim >del-z-patch.with &&
82 + git diff --unified=0 >del-z-patch.without
83
84 : done
85 '
t/t4202-log.sh
+1 -1
@@ -481,7 +481,7 @@ test_expect_success 'log.decorate configuration' '
481 git log --oneline --no-decorate >actual &&
482 test_cmp expect.none actual &&
483 git log --oneline --decorate >actual &&
484 - test_cmp expect.short actual
484 + test_cmp expect.short actual &&
485
486 test_unconfig log.decorate &&
487 git log --pretty=raw >expect.raw &&
t/t5100-mailinfo.sh
+1 -1
@@ -34,7 +34,7 @@ do
34 if test -f "$TEST_DIRECTORY"/t5100/msg$mail--no-inbody-headers
35 then
36 check_mailinfo $mail --no-inbody-headers
37 - fi
37 + fi &&
38 if test -f "$TEST_DIRECTORY"/t5100/msg$mail--message-id
39 then
40 check_mailinfo $mail --message-id
t/t5510-fetch.sh
+1 -1
@@ -124,7 +124,7 @@ test_expect_success 'fetch --prune handles overlapping refspecs' '
124 git rev-parse origin/master &&
125 git rev-parse origin/pr/42 &&
126
127 - git config --unset-all remote.origin.fetch
127 + git config --unset-all remote.origin.fetch &&
128 git config remote.origin.fetch refs/pull/*/head:refs/remotes/origin/pr/* &&
129 git config --add remote.origin.fetch refs/heads/*:refs/remotes/origin/* &&
130
t/t5540-http-push-webdav.sh
+1 -1
@@ -169,7 +169,7 @@ test_expect_failure 'push to password-protected repository (no user in URL)' '
169 test_commit pw-nouser &&
170 set_askpass user@host pass@host &&
171 git push "$HTTPD_URL/auth/dumb/test_repo.git" HEAD &&
172 - expect_askpass both user@host
172 + expect_askpass both user@host &&
173 git rev-parse --verify HEAD >expect &&
174 git --git-dir="$HTTPD_DOCUMENT_ROOT_PATH/auth/dumb/test_repo.git" \
175 rev-parse --verify HEAD >actual &&
t/t5551-http-fetch-smart.sh
+1 -1
@@ -169,7 +169,7 @@ test_expect_success 'GIT_SMART_HTTP can disable smart http' '
169 '
170
171 test_expect_success 'invalid Content-Type rejected' '
172 - test_must_fail git clone $HTTPD_URL/broken_smart/repo.git 2>actual
172 + test_must_fail git clone $HTTPD_URL/broken_smart/repo.git 2>actual &&
173 grep "not valid:" actual
174 '
175
t/t6036-recursive-corner-cases.sh
+1 -1
@@ -533,7 +533,7 @@ test_expect_success 'merge of E2 & D fails but has appropriate contents' '
533
534 test $(git rev-parse :3:a) = $(git rev-parse B:a) &&
535 test $(git rev-parse :2:a/file) = $(git rev-parse E2:a/file) &&
536 - test $(git rev-parse :1:a/file) = $(git rev-parse C:a/file)
536 + test $(git rev-parse :1:a/file) = $(git rev-parse C:a/file) &&
537 test $(git rev-parse :0:ignore-me) = $(git rev-parse A:ignore-me) &&
538
539 test -f a~D^0
t/t9300-fast-import.sh
+1 -1
@@ -2228,7 +2228,7 @@ test_expect_success 'R: feature import-marks-if-exists' '
2228 >expect &&
2229
2230 git fast-import --import-marks-if-exists=not_io.marks \
2231 - --export-marks=io.marks <<-\EOF
2231 + --export-marks=io.marks <<-\EOF &&
2232 feature import-marks-if-exists=io.marks
2233 EOF
2234 test_cmp expect io.marks
t/t9902-completion.sh
+1 -1
@@ -568,7 +568,7 @@ test_expect_success 'complete files' '
568 test_completion "git commit " "modified" &&
569
570 : TODO .gitignore should not be here &&
571 - test_completion "git ls-files " <<-\EOF
571 + test_completion "git ls-files " <<-\EOF &&
572 .gitignore
573 dir
574 modified