From 4af28fbb6551cd33596096af422895c1998fa3e8 Mon Sep 17 00:00:00 2001 From: Ogulcan Celik Date: Tue, 12 May 2026 15:54:19 +0300 Subject: test: add ime input regressions --- src/pane.rs | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'src/pane.rs') diff --git a/src/pane.rs b/src/pane.rs index bf669ecf..98edf403 100644 --- a/src/pane.rs +++ b/src/pane.rs @@ -925,7 +925,15 @@ impl PaneRuntime { #[cfg(test)] impl PaneRuntime { pub(crate) fn test_with_channel(cols: u16, rows: u16) -> (Self, mpsc::Receiver) { - Self::test_with_channel_and_scrollback_bytes(cols, rows, 0, &[]) + Self::test_with_channel_and_scrollback_bytes(cols, rows, 0, &[], 4) + } + + pub(crate) fn test_with_channel_capacity( + cols: u16, + rows: u16, + capacity: usize, + ) -> (Self, mpsc::Receiver) { + Self::test_with_channel_and_scrollback_bytes(cols, rows, 0, &[], capacity) } pub(crate) fn test_with_screen_bytes(cols: u16, rows: u16, bytes: &[u8]) -> Self { @@ -938,7 +946,7 @@ impl PaneRuntime { scrollback_limit_bytes: usize, bytes: &[u8], ) -> Self { - Self::test_with_channel_and_scrollback_bytes(cols, rows, scrollback_limit_bytes, bytes).0 + Self::test_with_channel_and_scrollback_bytes(cols, rows, scrollback_limit_bytes, bytes, 4).0 } fn test_with_channel_and_scrollback_bytes( @@ -946,8 +954,9 @@ impl PaneRuntime { rows: u16, scrollback_limit_bytes: usize, bytes: &[u8], + channel_capacity: usize, ) -> (Self, mpsc::Receiver) { - let (tx, rx) = mpsc::channel(4); + let (tx, rx) = mpsc::channel(channel_capacity); let (resize_tx, _resize_rx) = watch::channel((rows, cols)); let mut terminal = crate::ghostty::Terminal::new(cols, rows, scrollback_limit_bytes).unwrap(); -- cgit v1.2.3