Skip to content

Commit c72ef4a

Browse files
committed
Add missing test coverage
1 parent b9ef24f commit c72ef4a

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

Diff for: test/patch/apply.js

+17
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,23 @@ describe('patch/apply', function() {
180180
+ ' line4\n'
181181
+ ' line4\n'))
182182
.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');
183200
});
184201

185202
it('should apply patches', function() {

0 commit comments

Comments
 (0)