Fix test
This commit is contained in:
@@ -847,7 +847,6 @@ fn test_move_cursor(cx: &mut TestAppContext) {
|
||||
|
||||
#[gpui::test]
|
||||
fn test_move_cursor_multibyte(cx: &mut TestAppContext) {
|
||||
todo!();
|
||||
init_test(cx, |_| {});
|
||||
|
||||
let view = cx
|
||||
@@ -889,6 +888,11 @@ fn test_move_cursor_multibyte(cx: &mut TestAppContext) {
|
||||
);
|
||||
|
||||
view.move_down(&MoveDown, cx);
|
||||
assert_eq!(
|
||||
view.selections.display_ranges(cx),
|
||||
&[empty_range(1, "ab⋯e".len())]
|
||||
);
|
||||
view.move_left(&MoveLeft, cx);
|
||||
assert_eq!(
|
||||
view.selections.display_ranges(cx),
|
||||
&[empty_range(1, "ab⋯".len())]
|
||||
@@ -931,16 +935,6 @@ fn test_move_cursor_multibyte(cx: &mut TestAppContext) {
|
||||
&[empty_range(1, "ab⋯e".len())]
|
||||
);
|
||||
view.move_up(&MoveUp, cx);
|
||||
assert_eq!(
|
||||
view.selections.display_ranges(cx),
|
||||
&[empty_range(0, "ⓐⓑ⋯ⓔ".len())]
|
||||
);
|
||||
view.move_left(&MoveLeft, cx);
|
||||
assert_eq!(
|
||||
view.selections.display_ranges(cx),
|
||||
&[empty_range(0, "ⓐⓑ⋯".len())]
|
||||
);
|
||||
view.move_left(&MoveLeft, cx);
|
||||
assert_eq!(
|
||||
view.selections.display_ranges(cx),
|
||||
&[empty_range(0, "ⓐⓑ".len())]
|
||||
@@ -950,6 +944,11 @@ fn test_move_cursor_multibyte(cx: &mut TestAppContext) {
|
||||
view.selections.display_ranges(cx),
|
||||
&[empty_range(0, "ⓐ".len())]
|
||||
);
|
||||
view.move_left(&MoveLeft, cx);
|
||||
assert_eq!(
|
||||
view.selections.display_ranges(cx),
|
||||
&[empty_range(0, "".len())]
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user