From 398da336f64f5cc2930867cadb2291b1c7c0a7cb Mon Sep 17 00:00:00 2001 From: Smit Barmase Date: Thu, 22 Jan 2026 23:57:46 +0530 Subject: [PATCH] terminal: Fix `test_terminal_eof` test failing on fish shell (#47410) It turns out Alacritty sends `AlacTermEvent::ColorRequest` when using the fish shell. That path relies on `cx.theme`, so this change is needed for it to pass. Co-authored-by: Lukas Release Notes: - N/A --- crates/terminal/src/terminal.rs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/crates/terminal/src/terminal.rs b/crates/terminal/src/terminal.rs index f9d727a72dbf1d045e1bd5f8a07c1ffa1755d98b..245d8e23f649b900f0fbad70ee6c3dcef4620ff3 100644 --- a/crates/terminal/src/terminal.rs +++ b/crates/terminal/src/terminal.rs @@ -2512,6 +2512,15 @@ mod tests { use smol::channel::Receiver; use task::{Shell, ShellBuilder}; + #[cfg(target_os = "macos")] + fn init_test(cx: &mut TestAppContext) { + cx.update(|cx| { + let settings_store = settings::SettingsStore::test(cx); + cx.set_global(settings_store); + theme::init(theme::LoadThemes::JustBase, cx); + }); + } + /// Helper to build a test terminal running a shell command. /// Returns the terminal entity and a receiver for the completion signal. async fn build_test_terminal( @@ -2666,6 +2675,8 @@ mod tests { #[cfg(target_os = "macos")] #[gpui::test(iterations = 10)] async fn test_terminal_eof(cx: &mut TestAppContext) { + init_test(cx); + cx.executor().allow_parking(); let (completion_tx, completion_rx) = smol::channel::unbounded();