From a165b4ee2cd5a66a18e7e2dec03462b24f1fe084 Mon Sep 17 00:00:00 2001 From: Nathaniel Ledford Date: Thu, 29 Oct 2026 11:21:35 -0400 Subject: [PATCH] i18n: the gaps report test compares paths, not their text On Windows the separator is a backslash, so the list of source files never equaled "sub/widget.rs". --- crates/ui-egui/src/i18n/gaps.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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]