mirror of
https://github.com/swc-project/swc.git
synced 2024-12-28 08:04:43 +03:00
fix(testing): Fix path normalization on windows for testing diffs (#7299)
This commit is contained in:
parent
ffa76894fd
commit
3422923cb0
@ -53,14 +53,13 @@ impl fmt::Debug for NormalizedOutput {
|
||||
}
|
||||
|
||||
fn normalize_input(input: String, skip_last_newline: bool) -> String {
|
||||
let manifest_dirs = vec![
|
||||
let manifest_dirs = [
|
||||
adjust_canonicalization(paths::manifest_dir()),
|
||||
paths::manifest_dir().to_string_lossy().to_string(),
|
||||
adjust_canonicalization(paths::manifest_dir()).replace('\\', "\\\\"),
|
||||
paths::manifest_dir()
|
||||
.to_string_lossy()
|
||||
.replace('\\', "\\\\"),
|
||||
];
|
||||
]
|
||||
.into_iter()
|
||||
.flat_map(|dir| [dir.replace('\\', "\\\\"), dir.replace('\\', "/"), dir])
|
||||
.collect::<Vec<_>>();
|
||||
|
||||
let input = input.replace("\r\n", "\n");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user