patch(issue #106): fixes merge edge-case with add (#107)

* patch(issue #106): fixes merge edge-case with add

* bump
This commit is contained in:
Jamie Peabody
2019-01-23 22:39:04 +00:00
committed by GitHub
parent d9f2edc1ad
commit a2eaef8a13
5 changed files with 21 additions and 5 deletions

View File

@@ -336,6 +336,12 @@ describe('mergely', function () {
dir: 'lhs',
name: 'delete is lines 2-3 and insert into middle of rhs'
},
{
lhs: 'a\nb\nc',
rhs: 'a\nb\nx\nc',
dir: 'lhs',
name: 'delete line 3 of length 1 of rhs and will be replaced with empty line 2 of lhs'
},
// delete 36-43 merge rhs
{
lhs: '\na',
@@ -384,6 +390,12 @@ describe('mergely', function () {
rhs: 'a\nd',
dir: 'rhs',
name: 'delete is lines 2-3 and insert into middle of rhs'
},
{
lhs: 'a\nb\nc',
rhs: 'a\nb\nx\nc',
dir: 'rhs',
name: 'merge rhs line 3 of length 1 and insert after line 2 of lhs'
}];
opts.forEach((opt, i) => {