t: avoid using ":" for comments
The ":" is not a comment marker, but rather a noop command. Using it as a comment like: : do something cmd1 && : something else cmd2 breaks the &&-chain, and we would fail to notice if "cmd1" failed in this instance. We can just use regular "#" comments instead. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
9ddc5ac97e
commit
53350a35a3
@ -18,7 +18,7 @@ test_expect_success setup '
|
|||||||
cat victim >original &&
|
cat victim >original &&
|
||||||
git update-index --add victim &&
|
git update-index --add victim &&
|
||||||
|
|
||||||
: add to the head
|
# add to the head
|
||||||
for i in a b '"$L"' y
|
for i in a b '"$L"' y
|
||||||
do
|
do
|
||||||
echo $i
|
echo $i
|
||||||
@ -27,7 +27,7 @@ test_expect_success setup '
|
|||||||
git diff victim >add-a-patch.with &&
|
git diff victim >add-a-patch.with &&
|
||||||
git diff --unified=0 >add-a-patch.without &&
|
git diff --unified=0 >add-a-patch.without &&
|
||||||
|
|
||||||
: insert at line two
|
# insert at line two
|
||||||
for i in b a '"$L"' y
|
for i in b a '"$L"' y
|
||||||
do
|
do
|
||||||
echo $i
|
echo $i
|
||||||
@ -36,7 +36,7 @@ test_expect_success setup '
|
|||||||
git diff victim >insert-a-patch.with &&
|
git diff victim >insert-a-patch.with &&
|
||||||
git diff --unified=0 >insert-a-patch.without &&
|
git diff --unified=0 >insert-a-patch.without &&
|
||||||
|
|
||||||
: modify at the head
|
# modify at the head
|
||||||
for i in a '"$L"' y
|
for i in a '"$L"' y
|
||||||
do
|
do
|
||||||
echo $i
|
echo $i
|
||||||
@ -45,16 +45,16 @@ test_expect_success setup '
|
|||||||
git diff victim >mod-a-patch.with &&
|
git diff victim >mod-a-patch.with &&
|
||||||
git diff --unified=0 >mod-a-patch.without &&
|
git diff --unified=0 >mod-a-patch.without &&
|
||||||
|
|
||||||
: remove from the head
|
# remove from the head
|
||||||
for i in '"$L"' y
|
for i in '"$L"' y
|
||||||
do
|
do
|
||||||
echo $i
|
echo $i
|
||||||
done >victim &&
|
done >victim &&
|
||||||
cat victim >del-a-expect &&
|
cat victim >del-a-expect &&
|
||||||
git diff victim >del-a-patch.with
|
git diff victim >del-a-patch.with &&
|
||||||
git diff --unified=0 >del-a-patch.without &&
|
git diff --unified=0 >del-a-patch.without &&
|
||||||
|
|
||||||
: add to the tail
|
# add to the tail
|
||||||
for i in b '"$L"' y z
|
for i in b '"$L"' y z
|
||||||
do
|
do
|
||||||
echo $i
|
echo $i
|
||||||
@ -63,7 +63,7 @@ test_expect_success setup '
|
|||||||
git diff victim >add-z-patch.with &&
|
git diff victim >add-z-patch.with &&
|
||||||
git diff --unified=0 >add-z-patch.without &&
|
git diff --unified=0 >add-z-patch.without &&
|
||||||
|
|
||||||
: modify at the tail
|
# modify at the tail
|
||||||
for i in b '"$L"' z
|
for i in b '"$L"' z
|
||||||
do
|
do
|
||||||
echo $i
|
echo $i
|
||||||
@ -72,7 +72,7 @@ test_expect_success setup '
|
|||||||
git diff victim >mod-z-patch.with &&
|
git diff victim >mod-z-patch.with &&
|
||||||
git diff --unified=0 >mod-z-patch.without &&
|
git diff --unified=0 >mod-z-patch.without &&
|
||||||
|
|
||||||
: remove from the tail
|
# remove from the tail
|
||||||
for i in b '"$L"'
|
for i in b '"$L"'
|
||||||
do
|
do
|
||||||
echo $i
|
echo $i
|
||||||
@ -81,7 +81,7 @@ test_expect_success setup '
|
|||||||
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
|
||||||
'
|
'
|
||||||
|
|
||||||
for with in with without
|
for with in with without
|
||||||
|
@ -14,7 +14,7 @@ setup_srcdst_basic () {
|
|||||||
}
|
}
|
||||||
|
|
||||||
test_expect_success setup '
|
test_expect_success setup '
|
||||||
: create template repository
|
# create template repository
|
||||||
test_commit A &&
|
test_commit A &&
|
||||||
test_commit B &&
|
test_commit B &&
|
||||||
test_commit C
|
test_commit C
|
||||||
|
Reference in New Issue
Block a user