mirror of
https://github.com/martinvonz/jj.git
synced 2025-01-15 16:53:25 +00:00
conflicts: demo failed parse of diff with empty line
This commit is contained in:
parent
9674852dc7
commit
efacbcbd45
1 changed files with 26 additions and 0 deletions
|
@ -766,6 +766,32 @@ fn test_parse_conflict_crlf_markers() {
|
|||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_parse_conflict_diff_stripped_whitespace() {
|
||||
// Conflict parsing fails since diff contains empty line without leading space
|
||||
assert_eq!(
|
||||
parse_conflict(
|
||||
indoc! {b"
|
||||
line 1
|
||||
<<<<<<<
|
||||
%%%%%%%
|
||||
line 2
|
||||
|
||||
-line 3
|
||||
+left
|
||||
\r
|
||||
line 4
|
||||
+++++++
|
||||
right
|
||||
>>>>>>>
|
||||
line 5
|
||||
"},
|
||||
2
|
||||
),
|
||||
None
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_parse_conflict_wrong_arity() {
|
||||
// Valid conflict marker but it has fewer sides than the caller expected
|
||||
|
|
Loading…
Reference in a new issue