From a1ed7af5cf0d38c1c0e44d4d58d8ca9492872fe2 Mon Sep 17 00:00:00 2001 From: l0ng-ai Date: Thu, 3 Dec 2026 05:14:21 +0800 Subject: [PATCH] test(plugins): use a Windows absolute path in the stop command parser test (#7604) The test parsed a quoted /opt/... program, which has no drive on Windows, so validate_plugin_program rejected it and Rust (windows-latest) failed on main. --- crates/ide-host/src/plugins/execution.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/crates/ide-host/src/plugins/execution.rs b/crates/ide-host/src/plugins/execution.rs index 44c45ca1f6..c7dc7c1b8d 100644 --- a/crates/ide-host/src/plugins/execution.rs +++ b/crates/ide-host/src/plugins/execution.rs @@ -1255,9 +1255,10 @@ mod tests { #[test] fn plugin_stop_command_parser_rejects_shell_syntax() { assert_eq!(parse_plugin_stop_command("catalina stop").unwrap(), ("catalina".into(), vec!["stop".into()])); + let program = if cfg!(windows) { r"C:\tomcat\bin\catalina.bat" } else { "/opt/tomcat/bin/catalina" }; assert_eq!( - parse_plugin_stop_command(r#""/opt/tomcat/bin/catalina" stop --force 'now'"#).unwrap(), - ("/opt/tomcat/bin/catalina".into(), vec!["stop".into(), "--force".into(), "now".into()]) + parse_plugin_stop_command(&format!(r#""{program}" stop --force 'now'"#)).unwrap(), + (program.into(), vec!["stop".into(), "--force".into(), "now".into()]) ); for bad in [ "",