@@ -138,6 +138,8 @@ func TestParsePatchHeader(t *testing.T) {
138138 }
139139 expectedDate := time .Date (2020 , 04 , 11 , 15 , 21 , 23 , 0 , time .FixedZone ("PDT" , - 7 * 60 * 60 ))
140140 expectedTitle := "A sample commit to test header parsing"
141+ expectedEmojiOneLineTitle := "🤖 Enabling auto-merging"
142+ expectedEmojiMultiLineTitle := "[IA64] Put ia64 config files on the Uwe Kleine-König diet"
141143 expectedBody := "The medium format shows the body, which\n may wrap on to multiple lines.\n \n Another body line."
142144 expectedBodyAppendix := "CC: Joe Smith <[email protected] >" 143145
@@ -267,6 +269,45 @@ Another body line.
267269 Body : expectedBody ,
268270 },
269271 },
272+ "mailboxEmojiOneLine" : {
273+ Input : `From 61f5cd90bed4d204ee3feb3aa41ee91d4734855b Mon Sep 17 00:00:00 2001
274+ From: Morton Haypenny <[email protected] > 275+ Date: Sat, 11 Apr 2020 15:21:23 -0700
276+ Subject: [PATCH] =?UTF-8?q?=F0=9F=A4=96=20Enabling=20auto-merging?=
277+
278+ The medium format shows the body, which
279+ may wrap on to multiple lines.
280+
281+ Another body line.
282+ ` ,
283+ Header : PatchHeader {
284+ SHA : expectedSHA ,
285+ Author : expectedIdentity ,
286+ AuthorDate : expectedDate ,
287+ Title : expectedEmojiOneLineTitle ,
288+ Body : expectedBody ,
289+ },
290+ },
291+ "mailboxEmojiMultiLine" : {
292+ Input : `From 61f5cd90bed4d204ee3feb3aa41ee91d4734855b Mon Sep 17 00:00:00 2001
293+ From: Morton Haypenny <[email protected] > 294+ Date: Sat, 11 Apr 2020 15:21:23 -0700
295+ Subject: [PATCH] =?UTF-8?q?[IA64]=20Put=20ia64=20config=20files=20on=20the=20?=
296+ =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig=20diet?=
297+
298+ The medium format shows the body, which
299+ may wrap on to multiple lines.
300+
301+ Another body line.
302+ ` ,
303+ Header : PatchHeader {
304+ SHA : expectedSHA ,
305+ Author : expectedIdentity ,
306+ AuthorDate : expectedDate ,
307+ Title : expectedEmojiMultiLineTitle ,
308+ Body : expectedBody ,
309+ },
310+ },
270311 "mailboxAppendix" : {
271312 Input : `From 61f5cd90bed4d204ee3feb3aa41ee91d4734855b Mon Sep 17 00:00:00 2001
272313From: Morton Haypenny <[email protected] >
0 commit comments