summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2020-02-17 13:22:17 -0800
committerLibravatar Junio C Hamano <gitster@pobox.com>2020-02-17 13:22:17 -0800
commitd880c3de231da4ff930d12e07b3cae9dc0c31415 (patch)
treeaa0ba294ff1542e364fad7c746fc013c587fde11 /t
parentMerge branch 'mr/show-config-scope' (diff)
parentmailinfo: factor out some repeated header handling (diff)
downloadtgif-d880c3de231da4ff930d12e07b3cae9dc0c31415.tar.xz
Merge branch 'jk/mailinfo-cleanup'
Code clean-up. * jk/mailinfo-cleanup: mailinfo: factor out some repeated header handling mailinfo: be more liberal with header whitespace mailinfo: simplify parsing of header values mailinfo: treat header values as C strings
Diffstat (limited to 't')
-rwxr-xr-xt/t5100-mailinfo.sh15
1 files changed, 15 insertions, 0 deletions
diff --git a/t/t5100-mailinfo.sh b/t/t5100-mailinfo.sh
index 9690dcad4f..147e616533 100755
--- a/t/t5100-mailinfo.sh
+++ b/t/t5100-mailinfo.sh
@@ -213,4 +213,19 @@ test_expect_failure 'mailinfo -b separated double [PATCH]' '
test z"$subj" = z"Subject: [other] message"
'
+test_expect_success 'mailinfo handles unusual header whitespace' '
+ git mailinfo /dev/null /dev/null >actual <<-\EOF &&
+ From:Real Name <user@example.com>
+ Subject: extra spaces
+ EOF
+
+ cat >expect <<-\EOF &&
+ Author: Real Name
+ Email: user@example.com
+ Subject: extra spaces
+
+ EOF
+ test_cmp expect actual
+'
+
test_done