Make path_with_trailing_space_gives_proper_error language independent (#4767)

The test currently fails on windows machines with non-english locale.
This commit is contained in:
konsti 2024-07-03 14:46:30 +02:00 committed by GitHub
parent dd7da6af5f
commit dcdf26eead
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -638,7 +638,14 @@ fn path_with_trailing_space_gives_proper_error() {
// Set a custom cache directory with a trailing space
let path_with_trailing_slash = format!("{} ", context.cache_dir.path().display());
uv_snapshot!(context.filters(), std::process::Command::new(crate::common::get_bin())
let mut filters = context.filters();
// Windows translates error messages, for example i get:
// "Caused by: Das System kann den angegebenen Pfad nicht finden. (os error 3)"
filters.push((
r"Caused by: .* \(os error 3\)",
"Caused by: The system cannot find the path specified. (os error 3)",
));
uv_snapshot!(filters, std::process::Command::new(crate::common::get_bin())
.arg("venv")
.env("UV_CACHE_DIR", path_with_trailing_slash), @r###"
success: false