From 59c8e8bdadc47b1ae60ac70efbeb0d0dd1cbf953 Mon Sep 17 00:00:00 2001 From: Mikayla Maki Date: Thu, 7 Jul 2022 14:38:21 -0700 Subject: [PATCH] Fixed integration test --- crates/terminal/src/terminal.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/crates/terminal/src/terminal.rs b/crates/terminal/src/terminal.rs index 849b174deb67a466913b46d02188d97af2c7605b..dd076335856afb7711a36049cb4ab5309d9f0ed6 100644 --- a/crates/terminal/src/terminal.rs +++ b/crates/terminal/src/terminal.rs @@ -38,7 +38,7 @@ const RIGHT_SEQ: &str = "\x1b[C"; const UP_SEQ: &str = "\x1b[A"; const DOWN_SEQ: &str = "\x1b[B"; const DEFAULT_TITLE: &str = "Terminal"; -const DEBUG_TERMINAL_WIDTH: f32 = 300.; +const DEBUG_TERMINAL_WIDTH: f32 = 1000.; //This needs to be wide enough that the prompt can fill the whole space. const DEBUG_TERMINAL_HEIGHT: f32 = 200.; const DEBUG_CELL_WIDTH: f32 = 5.; const DEBUG_LINE_HEIGHT: f32 = 5.; @@ -608,8 +608,7 @@ mod tests { .expect("Could not remove test directory"); } - ///Basic integration test, can we get the terminal to show up, execute a command, - //and produce noticable output? + ///If this test is failing for you, check that DEBUG_TERMINAL_WIDTH is wide enough to fit your entire command prompt! #[gpui::test] async fn test_copy(cx: &mut TestAppContext) { let terminal = cx.add_view(Default::default(), |cx| Terminal::new(cx, None)); @@ -632,7 +631,7 @@ mod tests { let mut term = terminal.term.lock(); term.selection = Some(Selection::new( SelectionType::Semantic, - Point::new(Line(3), Column(0)), + Point::new(Line(2), Column(0)), Side::Right, )); drop(term);