Thread (43 messages) flat view 43 messages, 7 authors, 2021-01-15

Re: [PATCH 09/22] mailmap tests: add a test for "not a blob" error

From: Junio C Hamano <hidden>
Date: 2021-01-12 22:35:15

Ævar Arnfjörð Bjarmason  [off-list ref] writes:
Add a test for one of the error conditions added in
938a60d64f (mailmap: clean up read_mailmap error handling,
2012-12-12).

Signed-off-by: Ævar Arnfjörð Bjarmason <redacted>
---
 t/t4203-mailmap.sh | 9 +++++++++
 1 file changed, 9 insertions(+)
Nice to see a patch that tries to be careful, like this one.
quoted hunk ↗ jump to hunk
diff --git a/t/t4203-mailmap.sh b/t/t4203-mailmap.sh
index 03a98d9635..78d56e0566 100755
--- a/t/t4203-mailmap.sh
+++ b/t/t4203-mailmap.sh
@@ -333,6 +333,15 @@ test_expect_success 'mailmap.blob can be missing' '
 	test_cmp expect actual
 '
 
+test_expect_success 'mailmap.blob might be the wrong type' '
+	test_when_finished "rm .mailmap" &&
+	cp default.map .mailmap &&
+
+	git -c mailmap.blob=HEAD: shortlog HEAD >actual 2>err &&
+	test_i18ngrep "mailmap is not a blob" err &&
+	test_cmp expect actual
+'
+
 test_expect_success 'mailmap.blob defaults to off in non-bare repo' '
 	git init non-bare &&
 	(
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help