aboutsummaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
authorGravatar Austin Clements <amdragon@MIT.EDU>2013-08-16 11:35:42 -0400
committerGravatar David Bremner <bremner@debian.org>2013-08-17 09:05:44 +0200
commit6cdab6e0b77041791f70345ac729d63d865bae5e (patch)
treedfa453493e1688d390b3fb5dc829ea14327be054 /test
parentad7bb423fb26f2b2fb801d3c2e3ceef9c7e3e622 (diff)
reply: Remove extraneous space from generated References
Previously, the References header code seemed to assume notmuch_message_get_header would return NULL if the header was not present, but it actually returns "". As a result of this, it was inserting an unnecessary space when concatenating an empty or missing original references header with the new reference. This shows up in only two tests because the text reply format later passes the whole reply template through g_mime_filter_headers, which has the side effect of stripping out this extra space.
Diffstat (limited to 'test')
-rwxr-xr-xtest/multipart2
-rwxr-xr-xtest/reply2
2 files changed, 2 insertions, 2 deletions
diff --git a/test/multipart b/test/multipart
index c974226e..2033023a 100755
--- a/test/multipart
+++ b/test/multipart
@@ -599,7 +599,7 @@ cat <<EOF >EXPECTED
"From": "Notmuch Test Suite <test_suite@notmuchmail.org>",
"To": "Carl Worth <cworth@cworth.org>, cworth@cworth.org",
"In-reply-to": "<87liy5ap00.fsf@yoom.home.cworth.org>",
- "References": " <87liy5ap00.fsf@yoom.home.cworth.org>"},
+ "References": "<87liy5ap00.fsf@yoom.home.cworth.org>"},
"original": {"id": "XXXXX",
"match": false,
"excluded": false,
diff --git a/test/reply b/test/reply
index c877ffe1..a85ebe56 100755
--- a/test/reply
+++ b/test/reply
@@ -242,7 +242,7 @@ test_expect_equal_json "$output" '
"reply-headers": {
"From": "Notmuch Test Suite <test_suite@notmuchmail.org>",
"In-reply-to": "<'${gen_msg_id}'>",
- "References": " <'${gen_msg_id}'>",
+ "References": "<'${gen_msg_id}'>",
"Subject": "Re: \u00e0\u00df\u00e7",
"To": "\u2603 <snowman@example.com>"
}