diff --git a/native/XPlatLauncher/tests/default_tests.rs b/native/XPlatLauncher/tests/default_tests.rs index 43174d338acb..513a23ee1310 100644 --- a/native/XPlatLauncher/tests/default_tests.rs +++ b/native/XPlatLauncher/tests/default_tests.rs @@ -5,8 +5,8 @@ pub mod utils; #[cfg(test)] mod tests { use std::{env, fs}; - use std::collections::HashMap; - use std::path::PathBuf; + use std::collections::{HashMap, HashSet}; + use std::path::{PathBuf, MAIN_SEPARATOR}; use xplat_launcher::{get_caches_home, jvm_property}; use crate::utils::*; @@ -68,6 +68,8 @@ mod tests { assert!(classpath.contains("app.jar"), "app.jar is not present in classpath: {}", classpath); let os_specific_jar = format!("boot-{}.jar", env::consts::OS); assert!(classpath.contains(&os_specific_jar), "{} is not present in classpath: {}", os_specific_jar, classpath); + let separators = classpath.chars().filter(|c| *c == '/' || *c == '\\').collect::>(); + assert_eq!(separators, HashSet::from([MAIN_SEPARATOR]), "Unexpected directory separators in {}", classpath); } fn assert_startup_error(result: &LauncherRunResult, message: &str) {