LightCraft: An open-source non-destructive photo editor written by scratch in pure Rust
i18n: the gaps report test compares paths, not their text
Nathaniel Ledforda165b4ee2cd5
diff --git a/crates/ui-egui/src/i18n/gaps.rs b/crates/ui-egui/src/i18n/gaps.rsindex 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 listedlet mut files = Vec::new();source_files(&dir, &mut files);- let names: Vec<String> = files.iter().map(|path| path.strip_prefix(&dir).unwrap().display().to_string()).collect();+ let names: Vec<PathBuf> = 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]