tests: use setup_test_locale helper in touch test

Replace manual unsafe env::set_var + setup_localization calls with
the new setup_test_locale helper function for cleaner test code.
This commit is contained in:
Sylvestre Ledru
2026-01-05 15:42:30 +01:00
parent 44ce7350f7
commit acff994611
+1 -4
View File
@@ -911,10 +911,7 @@ mod tests {
#[cfg(windows)]
#[test]
fn test_get_pathbuf_from_stdout_fails_if_stdout_is_not_a_file() {
unsafe {
env::set_var("LANG", "C");
}
let _ = locale::setup_localization("touch");
let _ = locale::setup_test_locale("touch");
// We can trigger an error by not setting stdout to anything (will
// fail with code 1)
assert!(