Fix Windows test failures not being detected in CI (#36446)
Bug introduced in #35926 Release Notes: - N/A
This commit is contained in:
@@ -590,9 +590,9 @@ mod tests {
|
||||
assert_eq!(
|
||||
fs.files_with_contents(Path::new("")),
|
||||
[
|
||||
(Path::new("/bar/baz").into(), b"qux".into()),
|
||||
(Path::new("/foo/a").into(), b"lorem".into()),
|
||||
(Path::new("/foo/b").into(), b"ipsum".into())
|
||||
(Path::new(path!("/bar/baz")).into(), b"qux".into()),
|
||||
(Path::new(path!("/foo/a")).into(), b"lorem".into()),
|
||||
(Path::new(path!("/foo/b")).into(), b"ipsum".into())
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
+3
-1
@@ -1101,7 +1101,9 @@ impl FakeFsState {
|
||||
) -> Option<(&mut FakeFsEntry, PathBuf)> {
|
||||
let canonical_path = self.canonicalize(target, follow_symlink)?;
|
||||
|
||||
let mut components = canonical_path.components();
|
||||
let mut components = canonical_path
|
||||
.components()
|
||||
.skip_while(|component| matches!(component, Component::Prefix(_)));
|
||||
let Some(Component::RootDir) = components.next() else {
|
||||
panic!(
|
||||
"the path {:?} was not canonicalized properly {:?}",
|
||||
|
||||
Reference in New Issue
Block a user