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.
Цей коміт міститься в:
l0ng-ai authored and GitHub committed 2026-12-03 05:14:21 +08:00
1 джерело 43dac21ac3
коміт a1ed7af5cf
1 file changed
+3 -2
+3 -2
Переглянути файл
@@ -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 [
"",