summaryrefslogtreecommitdiff
path: root/t/t4205-log-pretty-formats.sh
diff options
context:
space:
mode:
Diffstat (limited to 't/t4205-log-pretty-formats.sh')
-rwxr-xr-xt/t4205-log-pretty-formats.sh18
1 files changed, 17 insertions, 1 deletions
diff --git a/t/t4205-log-pretty-formats.sh b/t/t4205-log-pretty-formats.sh
index 5865daa8f8..e448ef2928 100755
--- a/t/t4205-log-pretty-formats.sh
+++ b/t/t4205-log-pretty-formats.sh
@@ -976,7 +976,7 @@ test_expect_success '%(describe) vs git describe' '
else
: >expect-contains-bad
fi &&
- echo "$hash $desc"
+ echo "$hash $desc" || return 1
done >expect &&
test_path_exists expect-contains-good &&
test_path_exists expect-contains-bad &&
@@ -1002,4 +1002,20 @@ test_expect_success '%(describe:exclude=...) vs git describe --exclude ...' '
test_cmp expect actual
'
+test_expect_success '%(describe:tags) vs git describe --tags' '
+ test_when_finished "git tag -d tagname" &&
+ git tag tagname &&
+ git describe --tags >expect &&
+ git log -1 --format="%(describe:tags)" >actual &&
+ test_cmp expect actual
+'
+
+test_expect_success '%(describe:abbrev=...) vs git describe --abbrev=...' '
+ test_when_finished "git tag -d tagname" &&
+ git tag -a -m tagged tagname &&
+ git describe --abbrev=15 >expect &&
+ git log -1 --format="%(describe:abbrev=15)" >actual &&
+ test_cmp expect actual
+'
+
test_done