@@ -163,7 +163,7 @@ func TestParsePatchHeader(t *testing.T) {
163163 Raw : "Sat Apr 11 15:21:23 2020 -0700" ,
164164 }
165165 expectedTitle := "A sample commit to test header parsing"
166- expectedMsg := "The medium format shows the body, which\n may wrap on to multiple lines.\n \n Another body line."
166+ expectedBody := "The medium format shows the body, which\n may wrap on to multiple lines.\n \n Another body line."
167167
168168 tests := map [string ]struct {
169169 Input string
@@ -199,7 +199,7 @@ Date: Sat Apr 11 15:21:23 2020 -0700
199199 Author : expectedIdentity ,
200200 AuthorDate : expectedDate ,
201201 Title : expectedTitle ,
202- Message : expectedMsg ,
202+ Body : expectedBody ,
203203 },
204204 },
205205 "prettyFull" : {
@@ -219,7 +219,7 @@ Commit: Morton Haypenny <mhaypenny@example.com>
219219 Author : expectedIdentity ,
220220 Committer : expectedIdentity ,
221221 Title : expectedTitle ,
222- Message : expectedMsg ,
222+ Body : expectedBody ,
223223 },
224224 },
225225 "prettyFuller" : {
@@ -243,7 +243,7 @@ CommitDate: Sat Apr 11 15:21:23 2020 -0700
243243 Committer : expectedIdentity ,
244244 CommitterDate : expectedDate ,
245245 Title : expectedTitle ,
246- Message : expectedMsg ,
246+ Body : expectedBody ,
247247 },
248248 },
249249 "mailbox" : {
@@ -264,8 +264,8 @@ Another body line.
264264 Parsed : expectedDate .Parsed ,
265265 Raw : "Sat, 11 Apr 2020 15:21:23 -0700" ,
266266 },
267- Title : "[PATCH] " + expectedTitle ,
268- Message : expectedMsg ,
267+ Title : "[PATCH] " + expectedTitle ,
268+ Body : expectedBody ,
269269 },
270270 },
271271 "unwrapTitle" : {
@@ -304,7 +304,7 @@ Date: Sat Apr 11 15:21:23 2020 -0700
304304 Author : expectedIdentity ,
305305 AuthorDate : expectedDate ,
306306 Title : expectedTitle ,
307- Message : expectedMsg ,
307+ Body : expectedBody ,
308308 },
309309 },
310310 "ignoreLeadingBlankLines" : {
@@ -354,8 +354,8 @@ Author: Morton Haypenny <mhaypenny@example.com>
354354 if exp .Title != act .Title {
355355 t .Errorf ("incorrect parsed title:\n expected: %q\n actual: %q" , exp .Title , act .Title )
356356 }
357- if exp .Message != act .Message {
358- t .Errorf ("incorrect parsed message :\n expected: %q\n actual: %q" , exp .Message , act .Message )
357+ if exp .Body != act .Body {
358+ t .Errorf ("incorrect parsed body :\n expected: %q\n actual: %q" , exp .Body , act .Body )
359359 }
360360 })
361361 }
0 commit comments