@@ -90,7 +90,52 @@ public void ShouldParseSummaryAndDescription()
90
90
"Author Person" , "author@example.com" ,
91
91
"Author Person" , "author@example.com" ,
92
92
"Rename RepositoryModelBase to RepositoryModel" ,
93
- Environment . NewLine + "This is a line on the description" ,
93
+ "This is a line on the description" ,
94
+ commitTime ,
95
+ commitTime ,
96
+ new List < GitStatusEntry >
97
+ {
98
+ new GitStatusEntry ( "src/GitHub.App/Models/RemoteRepositoryModel.cs" ,
99
+ TestRootPath + @"\src/GitHub.App/Models/RemoteRepositoryModel.cs" , null ,
100
+ GitFileStatus . Modified ) ,
101
+ } )
102
+ } ;
103
+
104
+ AssertProcessOutput ( output , expected ) ;
105
+ }
106
+
107
+ [ Test ]
108
+ public void ShouldParseSummaryAndDescriptionWithExtraNewLines ( )
109
+ {
110
+ var output = new [ ]
111
+ {
112
+ "1cd4b9154a88bc8c7b09cb8cacc79bf1d5bde8cf" ,
113
+ "865b8d9d6e5e3bd6d7a4dc9c9f3588192314942c" ,
114
+ "Author Person" ,
115
+ "author@example.com" ,
116
+ "2017-01-06T15:36:57+01:00" ,
117
+ "Author Person" ,
118
+ "author@example.com" ,
119
+ "2017-01-06T15:36:57+01:00" ,
120
+ "Rename RepositoryModelBase to RepositoryModel" ,
121
+ "" ,
122
+ "" ,
123
+ "" ,
124
+ "This is a line on the description" ,
125
+ "---GHUBODYEND---" ,
126
+ "M src/GitHub.App/Models/RemoteRepositoryModel.cs" ,
127
+ null ,
128
+ } ;
129
+
130
+ var commitTime = new DateTimeOffset ( 2017 , 1 , 6 , 15 , 36 , 57 , TimeSpan . FromHours ( 1 ) ) ;
131
+
132
+ var expected = new [ ]
133
+ {
134
+ new GitLogEntry ( "1cd4b9154a88bc8c7b09cb8cacc79bf1d5bde8cf" ,
135
+ "Author Person" , "author@example.com" ,
136
+ "Author Person" , "author@example.com" ,
137
+ "Rename RepositoryModelBase to RepositoryModel" ,
138
+ Environment . NewLine + Environment . NewLine + "This is a line on the description" ,
94
139
commitTime ,
95
140
commitTime ,
96
141
new List < GitStatusEntry >
@@ -120,4 +165,4 @@ private void AssertProcessOutput(IEnumerable<string> lines, GitLogEntry[] expect
120
165
results . AssertEqual ( expected ) ;
121
166
}
122
167
}
123
- }
168
+ }
0 commit comments