From 49bd51c7c16324887f319db1f3ef146f095b7a36 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 d56864b631f74ec62e56b70642f1bc9d95c8a714..40b2cba6cb79670876f8c2a360db44df67b92b1d 100644 --- a/crates/terminal/src/terminal.rs +++ b/crates/terminal/src/terminal.rs @@ -37,7 +37,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);