t: fix moderate &&-chain breakage

These are tests which are missing a link in their &&-chain,
but in a way that probably does not effect the outcome of
the test. Most of these are of the form:

  some_cmd >actual
  test_cmp expect actual

The main point of the test is to verify the output, and a
failure in some_cmd would probably be noticed by bogus
output. But it is good for the tests to also confirm that
"some_cmd" does not die unexpectedly after producing its
output.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Jeff King
2015-03-20 06:06:44 -04:00
committed by Junio C Hamano
parent 8fb268720e
commit 60687de5ba
13 changed files with 44 additions and 44 deletions

View File

@ -94,7 +94,7 @@ EOF
while read verb expect cmd args
do
test_expect_success "$cmd $verb COLUMNS (big change)" '
COLUMNS=200 git $cmd $args >output
COLUMNS=200 git $cmd $args >output &&
grep " | " output >actual &&
test_cmp "$expect" actual
'
@ -102,7 +102,7 @@ do
test "$cmd" != diff || continue
test_expect_success "$cmd --graph $verb COLUMNS (big change)" '
COLUMNS=200 git $cmd $args --graph >output
COLUMNS=200 git $cmd $args --graph >output &&
grep " | " output >actual &&
test_cmp "$expect-graph" actual
'
@ -122,7 +122,7 @@ EOF
while read verb expect cmd args
do
test_expect_success "$cmd $verb not enough COLUMNS (big change)" '
COLUMNS=40 git $cmd $args >output
COLUMNS=40 git $cmd $args >output &&
grep " | " output >actual &&
test_cmp "$expect" actual
'
@ -130,7 +130,7 @@ do
test "$cmd" != diff || continue
test_expect_success "$cmd --graph $verb not enough COLUMNS (big change)" '
COLUMNS=40 git $cmd $args --graph >output
COLUMNS=40 git $cmd $args --graph >output &&
grep " | " output >actual &&
test_cmp "$expect-graph" actual
'
@ -150,7 +150,7 @@ EOF
while read verb expect cmd args
do
test_expect_success "$cmd $verb statGraphWidth config" '
git -c diff.statGraphWidth=26 $cmd $args >output
git -c diff.statGraphWidth=26 $cmd $args >output &&
grep " | " output >actual &&
test_cmp "$expect" actual
'
@ -158,7 +158,7 @@ do
test "$cmd" != diff || continue
test_expect_success "$cmd --graph $verb statGraphWidth config" '
git -c diff.statGraphWidth=26 $cmd $args --graph >output
git -c diff.statGraphWidth=26 $cmd $args --graph >output &&
grep " | " output >actual &&
test_cmp "$expect-graph" actual
'
@ -179,19 +179,19 @@ EOF
while read cmd args
do
test_expect_success "$cmd --stat=width with big change" '
git $cmd $args --stat=40 >output
git $cmd $args --stat=40 >output &&
grep " | " output >actual &&
test_cmp expect actual
'
test_expect_success "$cmd --stat-width=width with big change" '
git $cmd $args --stat-width=40 >output
git $cmd $args --stat-width=40 >output &&
grep " | " output >actual &&
test_cmp expect actual
'
test_expect_success "$cmd --stat-graph-width with big change" '
git $cmd $args --stat-graph-width=26 >output
git $cmd $args --stat-graph-width=26 >output &&
grep " | " output >actual &&
test_cmp expect actual
'
@ -199,13 +199,13 @@ do
test "$cmd" != diff || continue
test_expect_success "$cmd --stat-width=width --graph with big change" '
git $cmd $args --stat-width=40 --graph >output
git $cmd $args --stat-width=40 --graph >output &&
grep " | " output >actual &&
test_cmp expect-graph actual
'
test_expect_success "$cmd --stat-graph-width --graph with big change" '
git $cmd $args --stat-graph-width=26 --graph >output
git $cmd $args --stat-graph-width=26 --graph >output &&
grep " | " output >actual &&
test_cmp expect-graph actual
'
@ -265,7 +265,7 @@ EOF
while read verb expect cmd args
do
test_expect_success "$cmd $verb COLUMNS (long filename)" '
COLUMNS=200 git $cmd $args >output
COLUMNS=200 git $cmd $args >output &&
grep " | " output >actual &&
test_cmp "$expect" actual
'
@ -273,7 +273,7 @@ do
test "$cmd" != diff || continue
test_expect_success "$cmd --graph $verb COLUMNS (long filename)" '
COLUMNS=200 git $cmd $args --graph >output
COLUMNS=200 git $cmd $args --graph >output &&
grep " | " output >actual &&
test_cmp "$expect-graph" actual
'
@ -294,7 +294,7 @@ while read verb expect cmd args
do
test_expect_success COLUMNS_CAN_BE_1 \
"$cmd $verb prefix greater than COLUMNS (big change)" '
COLUMNS=1 git $cmd $args >output
COLUMNS=1 git $cmd $args >output &&
grep " | " output >actual &&
test_cmp "$expect" actual
'
@ -303,7 +303,7 @@ do
test_expect_success COLUMNS_CAN_BE_1 \
"$cmd --graph $verb prefix greater than COLUMNS (big change)" '
COLUMNS=1 git $cmd $args --graph >output
COLUMNS=1 git $cmd $args --graph >output &&
grep " | " output >actual &&
test_cmp "$expect-graph" actual
'
@ -320,7 +320,7 @@ EOF
test_expect_success 'merge --stat respects COLUMNS (big change)' '
git checkout -b branch HEAD^^ &&
COLUMNS=100 git merge --stat --no-ff master^ >output &&
grep " | " output >actual
grep " | " output >actual &&
test_cmp expect actual
'
@ -329,7 +329,7 @@ cat >expect <<'EOF'
EOF
test_expect_success 'merge --stat respects COLUMNS (long filename)' '
COLUMNS=100 git merge --stat --no-ff master >output &&
grep " | " output >actual
grep " | " output >actual &&
test_cmp expect actual
'