Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2020-02-18 00:22:17 +0300
committerJunio C Hamano <gitster@pobox.com>2020-02-18 00:22:17 +0300
commitd880c3de231da4ff930d12e07b3cae9dc0c31415 (patch)
treeaa0ba294ff1542e364fad7c746fc013c587fde11 /t
parent5d55554b1d099f3ae5e74f6d058edb55161510de (diff)
parentf696a2b1c850c81130740945835beec72727debf (diff)
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