From c72ef4aec8fc6318dd413ab7c225fa47891f607c Mon Sep 17 00:00:00 2001 From: Kevin Decker Date: Sun, 4 Mar 2018 22:08:07 -0600 Subject: [PATCH] Add missing test coverage --- test/patch/apply.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/test/patch/apply.js b/test/patch/apply.js index 67965662..125199a8 100755 --- a/test/patch/apply.js +++ b/test/patch/apply.js @@ -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() {