This commit is contained in:
Conrad Irwin 2023-10-20 10:34:09 -06:00
parent 9d07561d99
commit b596b4153f
3 changed files with 11 additions and 13 deletions

View File

@ -1007,7 +1007,7 @@ pub mod tests {
use settings::SettingsStore;
use smol::stream::StreamExt;
use std::{env, sync::Arc};
use theme::{SyntaxTheme, Theme};
use theme::SyntaxTheme;
use util::test::{marked_text_ranges, sample_text};
use Bias::*;

View File

@ -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())]
);
});
}

View File

@ -429,7 +429,6 @@ mod tests {
test::{editor_test_context::EditorTestContext, marked_display_snapshot},
Buffer, DisplayMap, ExcerptRange, InlayId, MultiBuffer,
};
use language::language_settings::AllLanguageSettings;
use project::Project;
use settings::SettingsStore;
use util::post_inc;