Update Rust crate fs-err to v3 (#8625)

This commit is contained in:
renovate[bot] 2024-11-19 15:09:00 +00:00 committed by GitHub
parent 07806c404a
commit dae630ae50
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 66 additions and 46 deletions

View file

@ -43,5 +43,5 @@ workspace = true
[dev-dependencies]
indoc = { version = "2.0.5" }
insta = { version = "1.40.0" }
insta = { version = "1.40.0", features = ["filters"] }
tempfile = { version = "3.12.0" }

View file

@ -1022,8 +1022,15 @@ mod tests {
.unwrap()
.to_metadata(Path::new("/do/not/read"))
.unwrap_err();
// Simplified for windows compatibility.
assert_snapshot!(err.to_string().replace('\\', "/"), @"failed to open file `/do/not/read/Readme.md`");
// Strip away OS specific part.
let err = err
.to_string()
.replace('\\', "/")
.split_once(':')
.unwrap()
.0
.to_string();
assert_snapshot!(err, @"failed to open file `/do/not/read/Readme.md`");
}
#[test]