forked from mirrors/jj
test: fix merge tests to expect line-based merging
I made a quite late change in a recent patch to make the merge code to merge based on lines instead of words. I forgot to update the tests (and to even run them). Sorry :(
This commit is contained in:
parent
c071d412af
commit
cc4b1e9230
1 changed files with 17 additions and 17 deletions
|
@ -245,27 +245,27 @@ mod tests {
|
||||||
);
|
);
|
||||||
|
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
find_sync_regions(b"a b c", b"a x b c", b"a b y c"),
|
find_sync_regions(b"a\nb\nc\n", b"a\nx\nb\nc\n", b"a\nb\ny\nc\n"),
|
||||||
vec![
|
vec![
|
||||||
SyncRegion {
|
SyncRegion {
|
||||||
base: 0..1,
|
base: 0..2,
|
||||||
left: 0..1,
|
left: 0..2,
|
||||||
right: 0..1
|
right: 0..2
|
||||||
},
|
},
|
||||||
SyncRegion {
|
SyncRegion {
|
||||||
base: 2..3,
|
base: 2..4,
|
||||||
left: 4..5,
|
left: 4..6,
|
||||||
right: 2..3
|
right: 2..4
|
||||||
},
|
},
|
||||||
SyncRegion {
|
SyncRegion {
|
||||||
base: 4..5,
|
base: 4..6,
|
||||||
left: 6..7,
|
left: 6..8,
|
||||||
right: 6..7
|
right: 6..8
|
||||||
},
|
},
|
||||||
SyncRegion {
|
SyncRegion {
|
||||||
base: 5..5,
|
base: 6..6,
|
||||||
left: 7..7,
|
left: 8..8,
|
||||||
right: 7..7
|
right: 8..8
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
|
@ -290,13 +290,13 @@ mod tests {
|
||||||
MergeResult::Resolved(b"a b".to_vec())
|
MergeResult::Resolved(b"a b".to_vec())
|
||||||
);
|
);
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
merge(b"a", b"a b", b"a c"),
|
merge(b"a\n", b"a\nb\n", b"a\nc\n"),
|
||||||
MergeResult::Conflict(vec![
|
MergeResult::Conflict(vec![
|
||||||
MergeHunk::Resolved(b"a".to_vec()),
|
MergeHunk::Resolved(b"a\n".to_vec()),
|
||||||
MergeHunk::Conflict {
|
MergeHunk::Conflict {
|
||||||
base: b"".to_vec(),
|
base: b"".to_vec(),
|
||||||
left: b" b".to_vec(),
|
left: b"b\n".to_vec(),
|
||||||
right: b" c".to_vec()
|
right: b"c\n".to_vec()
|
||||||
}
|
}
|
||||||
])
|
])
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in a new issue