diff --git a/crates/ui-egui/src/i18n/gaps.rs b/crates/ui-egui/src/i18n/gaps.rs index 4bd6073d4..1cec9746e 100644 --- a/crates/ui-egui/src/i18n/gaps.rs +++ b/crates/ui-egui/src/i18n/gaps.rs @@ -362,10 +362,10 @@ mod tests { // When the source files are listed let mut files = Vec::new(); source_files(&dir, &mut files); - let names: Vec = files.iter().map(|path| path.strip_prefix(&dir).unwrap().display().to_string()).collect(); + let names: Vec = files.iter().map(|path| path.strip_prefix(&dir).unwrap().to_path_buf()).collect(); fs::remove_dir_all(&dir).unwrap(); - // Then the tests.rs is not among them - assert_eq!(names, ["app.rs", "sub/widget.rs"]); + // Then the tests.rs is not among them (compared as paths: the separator is `\` on Windows) + assert_eq!(names, [PathBuf::from("app.rs"), Path::new("sub").join("widget.rs")]); } #[test]