tests: add missing &&, batch 2

Same rules as before: this patch only adds " &&" to the end of
some lines in the test suite.

Intended to be applied on top of or squashed with the last
batch if they look okay.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Jonathan Nieder 2010-10-31 02:30:58 -05:00 committed by Junio C Hamano
parent a48fcd8369
commit 2dec68cf8f
13 changed files with 48 additions and 48 deletions

View File

@ -439,7 +439,7 @@ test_expect_success 'checkout when deleting .gitattributes' '
git rm .gitattributes &&
echo "contentsQ" | q_to_cr > .file2 &&
git add .file2 &&
git commit -m third
git commit -m third &&
git checkout master~1 &&
git checkout master &&

View File

@ -185,55 +185,55 @@ gd="Thu, 26 May 2005 18:33:00 -0500"
ld="Thu, 26 May 2005 18:43:00 -0500"
test_expect_success \
'Query "master@{May 25 2005}" (before history)' \
'rm -f o e
'rm -f o e &&
git rev-parse --verify "master@{May 25 2005}" >o 2>e &&
test '"$C"' = $(cat o) &&
test "warning: Log for '\'master\'' only goes back to $ed." = "$(cat e)"'
test_expect_success \
"Query master@{2005-05-25} (before history)" \
'rm -f o e
'rm -f o e &&
git rev-parse --verify master@{2005-05-25} >o 2>e &&
test '"$C"' = $(cat o) &&
echo test "warning: Log for '\'master\'' only goes back to $ed." = "$(cat e)"'
test_expect_success \
'Query "master@{May 26 2005 23:31:59}" (1 second before history)' \
'rm -f o e
'rm -f o e &&
git rev-parse --verify "master@{May 26 2005 23:31:59}" >o 2>e &&
test '"$C"' = $(cat o) &&
test "warning: Log for '\''master'\'' only goes back to $ed." = "$(cat e)"'
test_expect_success \
'Query "master@{May 26 2005 23:32:00}" (exactly history start)' \
'rm -f o e
'rm -f o e &&
git rev-parse --verify "master@{May 26 2005 23:32:00}" >o 2>e &&
test '"$C"' = $(cat o) &&
test "" = "$(cat e)"'
test_expect_success \
'Query "master@{May 26 2005 23:32:30}" (first non-creation change)' \
'rm -f o e
'rm -f o e &&
git rev-parse --verify "master@{May 26 2005 23:32:30}" >o 2>e &&
test '"$A"' = $(cat o) &&
test "" = "$(cat e)"'
test_expect_success \
'Query "master@{2005-05-26 23:33:01}" (middle of history with gap)' \
'rm -f o e
'rm -f o e &&
git rev-parse --verify "master@{2005-05-26 23:33:01}" >o 2>e &&
test '"$B"' = $(cat o) &&
test "warning: Log .git/logs/'"$m has gap after $gd"'." = "$(cat e)"'
test_expect_success \
'Query "master@{2005-05-26 23:38:00}" (middle of history)' \
'rm -f o e
'rm -f o e &&
git rev-parse --verify "master@{2005-05-26 23:38:00}" >o 2>e &&
test '"$Z"' = $(cat o) &&
test "" = "$(cat e)"'
test_expect_success \
'Query "master@{2005-05-26 23:43:00}" (exact end of history)' \
'rm -f o e
'rm -f o e &&
git rev-parse --verify "master@{2005-05-26 23:43:00}" >o 2>e &&
test '"$E"' = $(cat o) &&
test "" = "$(cat e)"'
test_expect_success \
'Query "master@{2005-05-28}" (past end of history)' \
'rm -f o e
'rm -f o e &&
git rev-parse --verify "master@{2005-05-28}" >o 2>e &&
test '"$D"' = $(cat o) &&
test "warning: Log .git/logs/'"$m unexpectedly ended on $ld"'." = "$(cat e)"'
@ -247,7 +247,7 @@ test_expect_success \
git add F &&
GIT_AUTHOR_DATE="2005-05-26 23:30" \
GIT_COMMITTER_DATE="2005-05-26 23:30" git commit -m add -a &&
h_TEST=$(git rev-parse --verify HEAD)
h_TEST=$(git rev-parse --verify HEAD) &&
echo The other day this did not work. >M &&
echo And then Bob told me how to fix it. >>M &&
echo OTHER >F &&

View File

@ -627,16 +627,16 @@ test_expect_success '--show-notes=ref accumulates' '
test_expect_success 'Allow notes on non-commits (trees, blobs, tags)' '
git config core.notesRef refs/notes/other &&
echo "Note on a tree" > expect
echo "Note on a tree" > expect &&
git notes add -m "Note on a tree" HEAD: &&
git notes show HEAD: > actual &&
test_cmp expect actual &&
echo "Note on a blob" > expect
echo "Note on a blob" > expect &&
filename=$(git ls-tree --name-only HEAD | head -n1) &&
git notes add -m "Note on a blob" HEAD:$filename &&
git notes show HEAD:$filename > actual &&
test_cmp expect actual &&
echo "Note on a tag" > expect
echo "Note on a tag" > expect &&
git tag -a -m "This is an annotated tag" foobar HEAD^ &&
git notes add -m "Note on a tag" foobar &&
git notes show foobar > actual &&

View File

@ -46,7 +46,7 @@ test_expect_success 'setup' '
test_commit G file1 &&
test_commit H file5 &&
git checkout -b branch2 F &&
test_commit I file6
test_commit I file6 &&
git checkout -b conflict-branch A &&
for n in one two three four
do
@ -584,7 +584,7 @@ test_expect_success 'do "noop" when there is nothing to cherry-pick' '
git checkout -b branch4 HEAD &&
GIT_EDITOR=: git commit --amend \
--author="Somebody else <somebody@else.com>"
--author="Somebody else <somebody@else.com>" &&
test $(git rev-parse branch3) != $(git rev-parse branch4) &&
git rebase -i branch3 &&
test $(git rev-parse branch3) = $(git rev-parse branch4)
@ -599,7 +599,7 @@ test_expect_success 'submodule rebase setup' '
git add elif && git commit -m "submodule initial"
) &&
echo 1 >file1 &&
git add file1 sub
git add file1 sub &&
test_tick &&
git commit -m "One" &&
echo 2 >file1 &&

View File

@ -368,7 +368,7 @@ test_expect_success 'missing blanks at EOF must only match blank lines' '
git diff -- one >patch &&
echo a >one &&
test_must_fail git apply patch
test_must_fail git apply patch &&
test_must_fail git apply --whitespace=fix patch &&
test_must_fail git apply --ignore-space-change --whitespace=fix patch
'
@ -419,7 +419,7 @@ test_expect_success 'same, but with CR-LF line endings && cr-at-eol set' '
printf "b\r\n" >>one &&
printf "c\r\n" >>one &&
cp one save-one &&
printf " \r\n" >>one
printf " \r\n" >>one &&
git add one &&
printf "d\r\n" >>one &&
cp one expect &&
@ -436,7 +436,7 @@ test_expect_success 'same, but with CR-LF line endings && cr-at-eol unset' '
printf "b\r\n" >>one &&
printf "c\r\n" >>one &&
cp one save-one &&
printf " \r\n" >>one
printf " \r\n" >>one &&
git add one &&
cp one expect &&
printf "d\r\n" >>one &&

View File

@ -54,7 +54,7 @@ EOF
'
test_expect_success NOT_MINGW 'fetch A (new commit : 1 connection)' '
rm -f $U
rm -f $U &&
(
cd cloned &&
GIT_DEBUG_SEND_PACK=3 git fetch 3>../$U &&
@ -87,7 +87,7 @@ EOF
'
test_expect_success NOT_MINGW 'fetch C, T (new branch, tag : 1 connection)' '
rm -f $U
rm -f $U &&
(
cd cloned &&
GIT_DEBUG_SEND_PACK=3 git fetch 3>../$U &&
@ -126,7 +126,7 @@ EOF
'
test_expect_success NOT_MINGW 'fetch B, S (commit and tag : 1 connection)' '
rm -f $U
rm -f $U &&
(
cd cloned &&
GIT_DEBUG_SEND_PACK=3 git fetch 3>../$U &&

View File

@ -10,11 +10,11 @@ test_expect_success 'preparing origin repository' '
git clone --bare . a.git &&
git clone --bare . x &&
test "$(GIT_CONFIG=a.git/config git config --bool core.bare)" = true &&
test "$(GIT_CONFIG=x/config git config --bool core.bare)" = true
test "$(GIT_CONFIG=x/config git config --bool core.bare)" = true &&
git bundle create b1.bundle --all &&
git bundle create b2.bundle master &&
mkdir dir &&
cp b1.bundle dir/b3
cp b1.bundle dir/b3 &&
cp b1.bundle b4
'
@ -112,7 +112,7 @@ test_expect_success 'bundle clone with nonexistent HEAD' '
cd "$D" &&
git clone b2.bundle b2 &&
cd b2 &&
git fetch
git fetch &&
test ! -e .git/refs/heads/master
'

View File

@ -207,7 +207,7 @@ test_expect_success 'git mv should not change sha1 of moved cache entry' '
git init &&
echo 1 >dirty &&
git add dirty &&
entry="$(git ls-files --stage dirty | cut -f 1)"
entry="$(git ls-files --stage dirty | cut -f 1)" &&
git mv dirty dirty2 &&
[ "$entry" = "$(git ls-files --stage dirty2 | cut -f 1)" ] &&
echo 2 >dirty2 &&

View File

@ -1097,7 +1097,7 @@ hash1=$(git rev-parse HEAD)
test_expect_success 'creating second commit and tag' '
echo foo-2.0 >foo &&
git add foo &&
git commit -m second
git commit -m second &&
git tag v2.0
'
@ -1122,18 +1122,18 @@ v2.0
EOF
test_expect_success 'checking that first commit is in all tags (hash)' "
git tag -l --contains $hash1 v* >actual
git tag -l --contains $hash1 v* >actual &&
test_cmp expected actual
"
# other ways of specifying the commit
test_expect_success 'checking that first commit is in all tags (tag)' "
git tag -l --contains v1.0 v* >actual
git tag -l --contains v1.0 v* >actual &&
test_cmp expected actual
"
test_expect_success 'checking that first commit is in all tags (relative)' "
git tag -l --contains HEAD~2 v* >actual
git tag -l --contains HEAD~2 v* >actual &&
test_cmp expected actual
"
@ -1142,7 +1142,7 @@ v2.0
EOF
test_expect_success 'checking that second commit only has one tag' "
git tag -l --contains $hash2 v* >actual
git tag -l --contains $hash2 v* >actual &&
test_cmp expected actual
"
@ -1151,7 +1151,7 @@ cat > expected <<EOF
EOF
test_expect_success 'checking that third commit has no tags' "
git tag -l --contains $hash3 v* >actual
git tag -l --contains $hash3 v* >actual &&
test_cmp expected actual
"
@ -1161,7 +1161,7 @@ test_expect_success 'creating simple branch' '
git branch stable v2.0 &&
git checkout stable &&
echo foo-3.0 > foo &&
git commit foo -m fourth
git commit foo -m fourth &&
git tag v3.0
'
@ -1172,7 +1172,7 @@ v3.0
EOF
test_expect_success 'checking that branch head only has one tag' "
git tag -l --contains $hash4 v* >actual
git tag -l --contains $hash4 v* >actual &&
test_cmp expected actual
"
@ -1186,7 +1186,7 @@ v4.0
EOF
test_expect_success 'checking that original branch head has one tag now' "
git tag -l --contains $hash3 v* >actual
git tag -l --contains $hash3 v* >actual &&
test_cmp expected actual
"
@ -1201,18 +1201,18 @@ v4.0
EOF
test_expect_success 'checking that initial commit is in all tags' "
git tag -l --contains $hash1 v* >actual
git tag -l --contains $hash1 v* >actual &&
test_cmp expected actual
"
# mixing modes and options:
test_expect_success 'mixing incompatibles modes and options is forbidden' '
test_must_fail git tag -a
test_must_fail git tag -l -v
test_must_fail git tag -n 100
test_must_fail git tag -l -m msg
test_must_fail git tag -l -F some file
test_must_fail git tag -a &&
test_must_fail git tag -l -v &&
test_must_fail git tag -n 100 &&
test_must_fail git tag -l -m msg &&
test_must_fail git tag -l -F some file &&
test_must_fail git tag -v -s
'

View File

@ -183,7 +183,7 @@ test_expect_success 'git clean symbolic link' '
mkdir -p build docs &&
touch a.out src/part3.c docs/manual.txt obj.o build/lib.so &&
ln -s docs/manual.txt src/part4.c
ln -s docs/manual.txt src/part4.c &&
git clean &&
test -f Makefile &&
test -f README &&

View File

@ -390,7 +390,7 @@ try_commit_status_combo () {
test_expect_success 'commit --no-status' '
clear_config commit.status &&
try_commit --no-status
try_commit --no-status &&
! grep "^# Changes to be committed:" .git/COMMIT_EDITMSG
'

View File

@ -56,7 +56,7 @@ test_expect_success 'loose objects in alternate ODB are not repacked' '
'
test_expect_success 'packed obs in alt ODB are repacked even when local repo is packless' '
mkdir alt_objects/pack
mkdir alt_objects/pack &&
mv .git/objects/pack/* alt_objects/pack &&
git repack -a &&
myidx=$(ls -1 .git/objects/pack/*.idx) &&
@ -95,14 +95,14 @@ test_expect_success 'packed obs in alternate ODB kept pack are repacked' '
# swap the .keep so the commit object is in the pack with .keep
for p in alt_objects/pack/*.pack
do
base_name=$(basename $p .pack)
base_name=$(basename $p .pack) &&
if test -f alt_objects/pack/$base_name.keep
then
rm alt_objects/pack/$base_name.keep
else
touch alt_objects/pack/$base_name.keep
fi
done
done &&
git repack -a -d &&
myidx=$(ls -1 .git/objects/pack/*.idx) &&
test -f "$myidx" &&

View File

@ -33,7 +33,7 @@ test_expect_success 'more emptiness' '
'
test_expect_success 'git svn rebase creates empty directory' '
( cd cloned && git svn rebase )
( cd cloned && git svn rebase ) &&
test -d cloned/"! !"
'