conflicts: demo failed parse of markers with CRLF

This commit is contained in:
Scott Taylor 2024-11-21 22:07:53 -06:00 committed by Scott Taylor
parent ffe5519fd0
commit ee7f829d4c

View file

@ -725,6 +725,29 @@ fn test_parse_conflict_multi_way() {
);
}
#[test]
fn test_parse_conflict_crlf_markers() {
// Conflict markers aren't recognized due to CRLF
assert_eq!(
parse_conflict(
indoc! {b"
line 1\r
<<<<<<<\r
+++++++\r
left\r
-------\r
base\r
+++++++\r
right\r
>>>>>>>\r
line 5\r
"},
2
),
None
);
}
#[test]
fn test_parse_conflict_wrong_arity() {
// Valid conflict marker but it has fewer sides than the caller expected