Skip to content

Commit 09fe8ca

Browse files
rscharfegitster
authored andcommitted
t4205: assert %(describe) test coverage
Document that the test is covering both describable and undescribable commits. Suggested-by: Ævar Arnfjörð Bjarmason <[email protected]> Signed-off-by: René Scharfe <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent b081547 commit 09fe8ca

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

t/t4205-log-pretty-formats.sh

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -965,8 +965,17 @@ test_expect_success 'log --pretty=reference is colored appropriately' '
965965
test_expect_success '%(describe) vs git describe' '
966966
git log --format="%H" | while read hash
967967
do
968-
echo "$hash $(git describe $hash)"
968+
if desc=$(git describe $hash)
969+
then
970+
: >expect-contains-good
971+
else
972+
: >expect-contains-bad
973+
fi &&
974+
echo "$hash $desc"
969975
done >expect &&
976+
test_path_exists expect-contains-good &&
977+
test_path_exists expect-contains-bad &&
978+
970979
git log --format="%H %(describe)" >actual 2>err &&
971980
test_cmp expect actual &&
972981
test_must_be_empty err

0 commit comments

Comments
 (0)