mirror of
https://github.com/zed-industries/zed.git
synced 2025-02-10 12:19:28 +00:00
Fix editor tests
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
This commit is contained in:
parent
c52b6328b7
commit
1d487e19f9
1 changed files with 15 additions and 14 deletions
|
@ -729,21 +729,19 @@ fn test_fold_action(cx: &mut TestAppContext) {
|
|||
#[gpui::test]
|
||||
fn test_move_cursor(cx: &mut TestAppContext) {
|
||||
cx.update(|cx| cx.set_global(Settings::test(cx)));
|
||||
let (_, view) = cx.add_window(|cx| {
|
||||
let buffer = MultiBuffer::build_simple(&sample_text(6, 6, 'a'), cx);
|
||||
buffer.update(cx, |buffer, cx| {
|
||||
buffer.edit(
|
||||
vec![
|
||||
(Point::new(1, 0)..Point::new(1, 0), "\t"),
|
||||
(Point::new(1, 1)..Point::new(1, 1), "\t"),
|
||||
],
|
||||
None,
|
||||
cx,
|
||||
);
|
||||
});
|
||||
build_editor(buffer.clone(), cx)
|
||||
});
|
||||
let buffer = cx.update(|cx| MultiBuffer::build_simple(&sample_text(6, 6, 'a'), cx));
|
||||
let (_, view) = cx.add_window(|cx| build_editor(buffer.clone(), cx));
|
||||
|
||||
buffer.update(cx, |buffer, cx| {
|
||||
buffer.edit(
|
||||
vec![
|
||||
(Point::new(1, 0)..Point::new(1, 0), "\t"),
|
||||
(Point::new(1, 1)..Point::new(1, 1), "\t"),
|
||||
],
|
||||
None,
|
||||
cx,
|
||||
);
|
||||
});
|
||||
view.update(cx, |view, cx| {
|
||||
assert_eq!(
|
||||
view.selections.display_ranges(cx),
|
||||
|
@ -5848,6 +5846,7 @@ async fn go_to_hunk(deterministic: Arc<Deterministic>, cx: &mut gpui::TestAppCon
|
|||
&r#"
|
||||
ˇuse some::modified;
|
||||
|
||||
|
||||
fn main() {
|
||||
println!("hello there");
|
||||
|
||||
|
@ -5869,6 +5868,7 @@ async fn go_to_hunk(deterministic: Arc<Deterministic>, cx: &mut gpui::TestAppCon
|
|||
&r#"
|
||||
use some::modified;
|
||||
|
||||
|
||||
fn main() {
|
||||
ˇ println!("hello there");
|
||||
|
||||
|
@ -5892,6 +5892,7 @@ async fn go_to_hunk(deterministic: Arc<Deterministic>, cx: &mut gpui::TestAppCon
|
|||
&r#"
|
||||
ˇuse some::modified;
|
||||
|
||||
|
||||
fn main() {
|
||||
println!("hello there");
|
||||
|
||||
|
|
Loading…
Reference in a new issue