дзеркало
https://github.com/l0ng-ai/openidea.git
синхронізовано 2026-12-05 01:31:41 +02:00
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.
Цей коміт міститься в:
1 джерело
43dac21ac3
коміт
a1ed7af5cf
1 file changed
+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 [
|
||||
"",
|
||||
|
||||
Reference in new issue
Заблокувати користувача