Skip to content

Commit 5ca812a

Browse files
peffgitster
authored andcommitted
t: assume test_cmp produces verbose output
Some tests call test_cmp, and if it fails show the actual output generated. This is mostly pointless, as test_cmp will already show a diff between the expected and actual output. It also fools --chain-lint by putting an "||" in the middle of the chain, so we'd rather not use this construct. Note that these cases actually show a pre-processed version of the data, rather than exactly what test_cmp would show. However, test_cmp's output is generally good for pointing the user in the right direction, and they can then dig in the trash directory themselves if they want to see more details. Signed-off-by: Jeff King <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 99094a7 commit 5ca812a

File tree

2 files changed

+3
-12
lines changed

2 files changed

+3
-12
lines changed

t/t6012-rev-list-simplify.sh

+2-8
Original file line numberDiff line numberDiff line change
@@ -95,10 +95,7 @@ check_outcome () {
9595
git log --pretty="$FMT" --parents $param |
9696
unnote >actual &&
9797
sed -e "s/^.* \([^ ]*\) .*/\1/" >check <actual &&
98-
test_cmp expect check || {
99-
cat actual
100-
false
101-
}
98+
test_cmp expect check
10299
'
103100
}
104101

@@ -121,10 +118,7 @@ test_expect_success 'full history simplification without parent' '
121118
git log --pretty="$FMT" --full-history E -- lost |
122119
unnote >actual &&
123120
sed -e "s/^.* \([^ ]*\) .*/\1/" >check <actual &&
124-
test_cmp expect check || {
125-
cat actual
126-
false
127-
}
121+
test_cmp expect check
128122
'
129123

130124
test_expect_success '--full-diff is not affected by --parents' '

t/t6111-rev-list-treesame.sh

+1-4
Original file line numberDiff line numberDiff line change
@@ -92,10 +92,7 @@ check_outcome () {
9292
git log --format="$FMT" $param |
9393
unnote >actual &&
9494
sed -e "$munge_actual" <actual >check &&
95-
test_cmp expect check || {
96-
cat actual
97-
false
98-
}
95+
test_cmp expect check
9996
'
10097
}
10198

0 commit comments

Comments
 (0)