Little exactness tweaks
* Correct Windows paths
\\ is only for the beginning of UNC paths, e.g.
\\host-name\share-name\file-path
as per
* Remove spaces path list using brace expansion
In the shell, spaces are significant in a path with brace expansion, and
break it. (As opposed to in Rust module brace expansion.)
@@ -764,9 +764,9 @@ mod tests {
#[cfg(windows)]
fn windows_path_handling() {
let expected = (ChangeKind::Templates, PathBuf::from("/templates/hello.html"));
- let pwd = Path::new(r#"C:\\Users\johan\site"#);
- let path = Path::new(r#"C:\\Users\johan\site\templates\hello.html"#);
- let config_filename = Path::new(r#"C:\\Users\johan\site\config.toml"#);
+ let pwd = Path::new(r#"C:\Users\johan\site"#);
+ let path = Path::new(r#"C:\Users\johan\site\templates\hello.html"#);
+ let config_filename = Path::new(r#"C:\Users\johan\site\config.toml"#);
assert_eq!(expected, detect_change_kind(pwd, path, config_filename));
}
