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>
This commit is contained in:
parent
bb79af9d09
commit
8fb268720e
@ -677,7 +677,7 @@ test_expect_success 'invalid unit' '
|
|||||||
echo 1auto >expect &&
|
echo 1auto >expect &&
|
||||||
git config aninvalid.unit >actual &&
|
git config aninvalid.unit >actual &&
|
||||||
test_cmp expect 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
|
fatal: bad numeric config value '\''1auto'\'' for '\''aninvalid.unit'\'' in .git/config: invalid unit
|
||||||
EOF
|
EOF
|
||||||
test_must_fail git config --int --get aninvalid.unit 2>actual &&
|
test_must_fail git config --int --get aninvalid.unit 2>actual &&
|
||||||
|
@ -28,7 +28,7 @@ test_expect_success 'show-ref' '
|
|||||||
|
|
||||||
>expect &&
|
>expect &&
|
||||||
|
|
||||||
test_must_fail git show-ref D >actual
|
test_must_fail git show-ref D >actual &&
|
||||||
test_cmp expect 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_must_fail git show-ref --verify tags/A >actual &&
|
||||||
test_cmp expect 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
|
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_must_fail git show-ref --verify -q tags/A >actual &&
|
||||||
test_cmp expect 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
|
test_cmp expect actual
|
||||||
'
|
'
|
||||||
|
|
||||||
@ -105,10 +105,10 @@ test_expect_success 'show-ref -d' '
|
|||||||
test_cmp expect actual &&
|
test_cmp expect actual &&
|
||||||
|
|
||||||
git show-ref -d refs/heads/master >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 &&
|
git show-ref -d --verify refs/heads/master >actual &&
|
||||||
test_cmp expect actual
|
test_cmp expect actual &&
|
||||||
|
|
||||||
>expect &&
|
>expect &&
|
||||||
|
|
||||||
|
@ -182,7 +182,7 @@ test_expect_success 'unify index, two files remain' '
|
|||||||
100644 e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 0 one
|
100644 e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 0 one
|
||||||
100644 e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 0 two
|
100644 e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 0 two
|
||||||
EOF
|
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 &&
|
test-dump-split-index .git/index | sed "/^own/d" >actual &&
|
||||||
cat >expect <<EOF &&
|
cat >expect <<EOF &&
|
||||||
|
@ -170,7 +170,7 @@ test_expect_success 'but with -f it should work.' '
|
|||||||
git rm -f foo baz &&
|
git rm -f foo baz &&
|
||||||
test ! -f foo &&
|
test ! -f foo &&
|
||||||
test ! -f baz &&
|
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
|
test_must_fail git ls-files --error-unmatch baz
|
||||||
'
|
'
|
||||||
|
|
||||||
|
@ -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 &&
|
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 &&
|
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 &&
|
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 &&
|
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 &&
|
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 &&
|
git diff --dirstat=files --dirstat=10 --dirstat=cumulative --dirstat=changes --dirstat=noncumulative -X3 -M HEAD^..HEAD >actual_diff_dirstat_M &&
|
||||||
|
@ -78,8 +78,8 @@ test_expect_success setup '
|
|||||||
echo $i
|
echo $i
|
||||||
done >victim &&
|
done >victim &&
|
||||||
cat victim >del-z-expect &&
|
cat victim >del-z-expect &&
|
||||||
git diff victim >del-z-patch.with
|
git diff victim >del-z-patch.with &&
|
||||||
git diff --unified=0 >del-z-patch.without &&
|
git diff --unified=0 >del-z-patch.without
|
||||||
|
|
||||||
: done
|
: done
|
||||||
'
|
'
|
||||||
|
@ -481,7 +481,7 @@ test_expect_success 'log.decorate configuration' '
|
|||||||
git log --oneline --no-decorate >actual &&
|
git log --oneline --no-decorate >actual &&
|
||||||
test_cmp expect.none actual &&
|
test_cmp expect.none actual &&
|
||||||
git log --oneline --decorate >actual &&
|
git log --oneline --decorate >actual &&
|
||||||
test_cmp expect.short actual
|
test_cmp expect.short actual &&
|
||||||
|
|
||||||
test_unconfig log.decorate &&
|
test_unconfig log.decorate &&
|
||||||
git log --pretty=raw >expect.raw &&
|
git log --pretty=raw >expect.raw &&
|
||||||
|
@ -34,7 +34,7 @@ do
|
|||||||
if test -f "$TEST_DIRECTORY"/t5100/msg$mail--no-inbody-headers
|
if test -f "$TEST_DIRECTORY"/t5100/msg$mail--no-inbody-headers
|
||||||
then
|
then
|
||||||
check_mailinfo $mail --no-inbody-headers
|
check_mailinfo $mail --no-inbody-headers
|
||||||
fi
|
fi &&
|
||||||
if test -f "$TEST_DIRECTORY"/t5100/msg$mail--message-id
|
if test -f "$TEST_DIRECTORY"/t5100/msg$mail--message-id
|
||||||
then
|
then
|
||||||
check_mailinfo $mail --message-id
|
check_mailinfo $mail --message-id
|
||||||
|
@ -124,7 +124,7 @@ test_expect_success 'fetch --prune handles overlapping refspecs' '
|
|||||||
git rev-parse origin/master &&
|
git rev-parse origin/master &&
|
||||||
git rev-parse origin/pr/42 &&
|
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 remote.origin.fetch refs/pull/*/head:refs/remotes/origin/pr/* &&
|
||||||
git config --add remote.origin.fetch refs/heads/*:refs/remotes/origin/* &&
|
git config --add remote.origin.fetch refs/heads/*:refs/remotes/origin/* &&
|
||||||
|
|
||||||
|
@ -169,7 +169,7 @@ test_expect_failure 'push to password-protected repository (no user in URL)' '
|
|||||||
test_commit pw-nouser &&
|
test_commit pw-nouser &&
|
||||||
set_askpass user@host pass@host &&
|
set_askpass user@host pass@host &&
|
||||||
git push "$HTTPD_URL/auth/dumb/test_repo.git" HEAD &&
|
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 rev-parse --verify HEAD >expect &&
|
||||||
git --git-dir="$HTTPD_DOCUMENT_ROOT_PATH/auth/dumb/test_repo.git" \
|
git --git-dir="$HTTPD_DOCUMENT_ROOT_PATH/auth/dumb/test_repo.git" \
|
||||||
rev-parse --verify HEAD >actual &&
|
rev-parse --verify HEAD >actual &&
|
||||||
|
@ -169,7 +169,7 @@ test_expect_success 'GIT_SMART_HTTP can disable smart http' '
|
|||||||
'
|
'
|
||||||
|
|
||||||
test_expect_success 'invalid Content-Type rejected' '
|
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
|
grep "not valid:" actual
|
||||||
'
|
'
|
||||||
|
|
||||||
|
@ -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 :3:a) = $(git rev-parse B:a) &&
|
||||||
test $(git rev-parse :2:a/file) = $(git rev-parse E2:a/file) &&
|
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 $(git rev-parse :0:ignore-me) = $(git rev-parse A:ignore-me) &&
|
||||||
|
|
||||||
test -f a~D^0
|
test -f a~D^0
|
||||||
|
@ -2228,7 +2228,7 @@ test_expect_success 'R: feature import-marks-if-exists' '
|
|||||||
>expect &&
|
>expect &&
|
||||||
|
|
||||||
git fast-import --import-marks-if-exists=not_io.marks \
|
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
|
feature import-marks-if-exists=io.marks
|
||||||
EOF
|
EOF
|
||||||
test_cmp expect io.marks
|
test_cmp expect io.marks
|
||||||
|
@ -568,7 +568,7 @@ test_expect_success 'complete files' '
|
|||||||
test_completion "git commit " "modified" &&
|
test_completion "git commit " "modified" &&
|
||||||
|
|
||||||
: TODO .gitignore should not be here &&
|
: TODO .gitignore should not be here &&
|
||||||
test_completion "git ls-files " <<-\EOF
|
test_completion "git ls-files " <<-\EOF &&
|
||||||
.gitignore
|
.gitignore
|
||||||
dir
|
dir
|
||||||
modified
|
modified
|
||||||
|
Loading…
Reference in New Issue
Block a user