Add more assertions for joining lines at the end of the file
Co-Authored-By: Conrad Irwin <conrad.irwin@gmail.com>
This commit is contained in:
parent
f07a929350
commit
61352f68ea
1 changed files with 14 additions and 0 deletions
|
@ -2376,6 +2376,20 @@ fn test_join_lines(cx: &mut TestAppContext) {
|
||||||
[Point::new(2, 3)..Point::new(2, 3)]
|
[Point::new(2, 3)..Point::new(2, 3)]
|
||||||
);
|
);
|
||||||
|
|
||||||
|
editor.join_lines(&JoinLines, cx);
|
||||||
|
assert_eq!(buffer.read(cx).text(), "aaa bbb\nccc\nddd");
|
||||||
|
assert_eq!(
|
||||||
|
editor.selections.ranges::<Point>(cx),
|
||||||
|
[Point::new(2, 3)..Point::new(2, 3)]
|
||||||
|
);
|
||||||
|
|
||||||
|
editor.join_lines(&JoinLines, cx);
|
||||||
|
assert_eq!(buffer.read(cx).text(), "aaa bbb\nccc\nddd");
|
||||||
|
assert_eq!(
|
||||||
|
editor.selections.ranges::<Point>(cx),
|
||||||
|
[Point::new(2, 3)..Point::new(2, 3)]
|
||||||
|
);
|
||||||
|
|
||||||
editor
|
editor
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue