diff options
author | Junio C Hamano <gitster@pobox.com> | 2020-02-17 13:22:17 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2020-02-17 13:22:17 -0800 |
commit | d880c3de231da4ff930d12e07b3cae9dc0c31415 (patch) | |
tree | aa0ba294ff1542e364fad7c746fc013c587fde11 /t | |
parent | Merge branch 'mr/show-config-scope' (diff) | |
parent | mailinfo: factor out some repeated header handling (diff) | |
download | tgif-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-x | t/t5100-mailinfo.sh | 15 |
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 |