Skip to content

Commit

Permalink
Add missing test coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
kpdecker committed Mar 5, 2018
1 parent b9ef24f commit c72ef4a
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions test/patch/apply.js
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,23 @@ describe('patch/apply', function() {
+ ' line4\n'
+ ' line4\n'))
.to.equal('line1\nline2\nline3\nline4\nline4\nline4\nline4');

// Test empty lines in patches
expect(applyPatch(
'line11\nline2\n\nline4',

'Index: test\n'
+ '===================================================================\n'
+ '--- test\theader1\n'
+ '+++ test\theader2\n'
+ '@@ -1,4 +1,4 @@\n'
+ '+line1\n'
+ '-line11\n'
+ ' line2\n'
+ '\n'
+ ' line4\n'
+ '\\ No newline at end of file\n'))
.to.equal('line1\nline2\n\nline4');
});

it('should apply patches', function() {
Expand Down

0 comments on commit c72ef4a

Please sign in to comment.