Fix tests

This commit is contained in:
Andras Schmelczer 2025-04-01 22:50:55 +01:00
commit 89b87efa59
No known key found for this signature in database
GPG key ID: FC8F2C3D3D1A718C
2 changed files with 7 additions and 6 deletions

View file

@ -292,7 +292,7 @@ mod test {
}, },
CursorPosition { CursorPosition {
id: 1, id: 1,
char_index: 0 char_index: 1
} }
] ]
) )
@ -336,18 +336,18 @@ mod test {
TextWithCursors::new( TextWithCursors::new(
"that was really complex sample for testing cursor movements", "that was really complex sample for testing cursor movements",
vec![ vec![
CursorPosition {
id: 2,
char_index: 5
}, // unchanged
CursorPosition { CursorPosition {
id: 0, id: 0,
char_index: 9 char_index: 9
}, // before "really" }, // before "really"
CursorPosition { CursorPosition {
id: 1, id: 1,
char_index: 25 char_index: 23
}, // inside of "s|ample" because "text" got replaced by "sample" }, // inside of "s|ample" because "text" got replaced by "sample"
CursorPosition {
id: 2,
char_index: 5
}, // unchanged
CursorPosition { CursorPosition {
id: 3, id: 3,
char_index: 31 char_index: 31

View file

@ -23,4 +23,5 @@ EditedText {
operation: <delete ' you? Adam' from index 43>, operation: <delete ' you? Adam' from index 43>,
}, },
], ],
cursors: [],
} }