Breaks in a test assertion's && chain can potentially hide
failures from earlier commands in the chain.
Commands intended to fail should be marked with !, test_must_fail, or
test_might_fail. The examples in this patch do not require that.
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
maint
Jonathan Nieder14 years agocommitted byJunio C Hamano
@ -111,7 +111,7 @@ test_expect_success 'email with embedded > is not okay' '
@@ -111,7 +111,7 @@ test_expect_success 'email with embedded > is not okay' '
'
test_expect_success 'tag pointing to nonexistent' '
@ -89,7 +89,7 @@ test_expect_success 'same, but do not remove trailing spaces' '
@@ -89,7 +89,7 @@ test_expect_success 'same, but do not remove trailing spaces' '
git config core.whitespace "-blank-at-eol" &&
git reset --hard HEAD^ &&
cp third file && git add file && git commit -m third &&
@ -330,7 +330,7 @@ test_expect_success 'check space before tab in indent (space-before-tab: on)' '
@@ -330,7 +330,7 @@ test_expect_success 'check space before tab in indent (space-before-tab: on)' '
test_expect_success 'check spaces as indentation (indent-with-non-tab: off)' '
@ -31,7 +31,7 @@ test_expect_success 'apply same filename with independent changes' '
@@ -31,7 +31,7 @@ test_expect_success 'apply same filename with independent changes' '
'
test_expect_success 'apply same filename with overlapping changes' '
git reset --hard
git reset --hard &&
modify "s/^d/z/" same_fn &&
git diff > patch0 &&
git add same_fn &&
@ -44,8 +44,8 @@ test_expect_success 'apply same filename with overlapping changes' '
@@ -44,8 +44,8 @@ test_expect_success 'apply same filename with overlapping changes' '
'
test_expect_success 'apply same new filename after rename' '
git reset --hard
git mv same_fn new_fn
git reset --hard &&
git mv same_fn new_fn &&
modify "s/^d/z/" new_fn &&
git add new_fn &&
git diff -M --cached > patch1 &&
@ -58,12 +58,12 @@ test_expect_success 'apply same new filename after rename' '
@@ -58,12 +58,12 @@ test_expect_success 'apply same new filename after rename' '
'
test_expect_success 'apply same old filename after rename -- should fail.' '
git reset --hard
git mv same_fn new_fn
git reset --hard &&
git mv same_fn new_fn &&
modify "s/^d/z/" new_fn &&
git add new_fn &&
git diff -M --cached > patch1 &&
git mv new_fn same_fn
git mv new_fn same_fn &&
modify "s/^e/y/" same_fn &&
git diff >> patch1 &&
git reset --hard &&
@ -71,13 +71,13 @@ test_expect_success 'apply same old filename after rename -- should fail.' '
@@ -71,13 +71,13 @@ test_expect_success 'apply same old filename after rename -- should fail.' '
@ -191,7 +191,7 @@ test_expect_success 'git show <commits> leaves list of commits as given' '
@@ -191,7 +191,7 @@ test_expect_success 'git show <commits> leaves list of commits as given' '
test_expect_success 'setup case sensitivity tests' '
echo case >one &&
test_tick &&
git add one
git add one &&
git commit -a -m Second
'
@ -341,7 +341,7 @@ test_expect_success 'set up more tangled history' '
@@ -341,7 +341,7 @@ test_expect_success 'set up more tangled history' '
@ -8,7 +8,7 @@ test_description='pack index with 64-bit offsets and object CRC'
@@ -8,7 +8,7 @@ test_description='pack index with 64-bit offsets and object CRC'
@ -57,7 +57,7 @@ test_expect_success 'copy commit and tree but not blob by hand' '
@@ -57,7 +57,7 @@ test_expect_success 'copy commit and tree but not blob by hand' '
cd cloned &&
git count-objects | sed -e "s/ *objects,.*//"
) ) &&
test $cnt -eq 6
test $cnt -eq 6 &&
blob=$(git rev-parse HEAD:file | sed -e "s|..|&/|") &&
@ -119,7 +119,7 @@ test_expect_success 'fetch must not resolve short tag name' '
@@ -119,7 +119,7 @@ test_expect_success 'fetch must not resolve short tag name' '
test_expect_success 'fetch must not resolve short remote name' '
test_expect_success 'warn on push to HEAD of non-bare repository' '
mk_test heads/master
mk_test heads/master &&
(
cd testrepo &&
git checkout master &&
@ -597,7 +597,7 @@ test_expect_success 'warn on push to HEAD of non-bare repository' '
@@ -597,7 +597,7 @@ test_expect_success 'warn on push to HEAD of non-bare repository' '
'
test_expect_success 'deny push to HEAD of non-bare repository' '
mk_test heads/master
mk_test heads/master &&
(
cd testrepo &&
git checkout master &&
@ -607,7 +607,7 @@ test_expect_success 'deny push to HEAD of non-bare repository' '
@@ -607,7 +607,7 @@ test_expect_success 'deny push to HEAD of non-bare repository' '
'
test_expect_success 'allow push to HEAD of bare repository (bare)' '
mk_test heads/master
mk_test heads/master &&
(
cd testrepo &&
git checkout master &&
@ -619,7 +619,7 @@ test_expect_success 'allow push to HEAD of bare repository (bare)' '
@@ -619,7 +619,7 @@ test_expect_success 'allow push to HEAD of bare repository (bare)' '
'
test_expect_success 'allow push to HEAD of non-bare repository (config)' '
@ -40,7 +40,7 @@ test_expect_success '-C option copies only the message with --reset-author' '
@@ -40,7 +40,7 @@ test_expect_success '-C option copies only the message with --reset-author' '