From c3bc62bd5244882661cc1dc396990f9aa4371e41 Mon Sep 17 00:00:00 2001 From: JoyElliot <72300219+JoyElliot@users.noreply.github.com> Date: Mon, 28 Sep 2026 12:31:38 +0800 Subject: [PATCH] =?UTF-8?q?test(workspace):=20=E5=A4=8D=E7=94=A8=E5=B9=B3?= =?UTF-8?q?=E5=8F=B0=E6=8E=A5=E5=8F=A3=E9=80=89=E6=8B=A9=E6=92=A4=E9=94=80?= =?UTF-8?q?=E5=BF=AB=E6=8D=B7=E9=94=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nebula_app/src/gpui_shell/workspace/rename/tests.rs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/nebula_app/src/gpui_shell/workspace/rename/tests.rs b/nebula_app/src/gpui_shell/workspace/rename/tests.rs index fe680f8..6653652 100644 --- a/nebula_app/src/gpui_shell/workspace/rename/tests.rs +++ b/nebula_app/src/gpui_shell/workspace/rename/tests.rs @@ -148,11 +148,17 @@ fn save_outside(cx: &mut VisualTestContext) { } fn undo(cx: &mut VisualTestContext) { - cx.simulate_keystrokes(if cfg!(target_os = "macos") { "cmd-z" } else { "ctrl-z" }); + cx.simulate_keystrokes(match crate::platform::Platform::current() { + crate::platform::Platform::MacOS => "cmd-z", + _ => "ctrl-z", + }); } fn redo(cx: &mut VisualTestContext) { - cx.simulate_keystrokes(if cfg!(target_os = "macos") { "cmd-shift-z" } else { "ctrl-y" }); + cx.simulate_keystrokes(match crate::platform::Platform::current() { + crate::platform::Platform::MacOS => "cmd-shift-z", + _ => "ctrl-y", + }); } #[gpui::test]