We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b9ef24f commit c72ef4aCopy full SHA for c72ef4a
test/patch/apply.js
@@ -180,6 +180,23 @@ describe('patch/apply', function() {
180
+ ' line4\n'
181
+ ' line4\n'))
182
.to.equal('line1\nline2\nline3\nline4\nline4\nline4\nline4');
183
+
184
+ // Test empty lines in patches
185
+ expect(applyPatch(
186
+ 'line11\nline2\n\nline4',
187
188
+ 'Index: test\n'
189
+ + '===================================================================\n'
190
+ + '--- test\theader1\n'
191
+ + '+++ test\theader2\n'
192
+ + '@@ -1,4 +1,4 @@\n'
193
+ + '+line1\n'
194
+ + '-line11\n'
195
+ + ' line2\n'
196
+ + '\n'
197
+ + ' line4\n'
198
+ + '\\ No newline at end of file\n'))
199
+ .to.equal('line1\nline2\n\nline4');
200
});
201
202
it('should apply patches', function() {
0 commit comments