diff --git a/src/uu/touch/src/touch.rs b/src/uu/touch/src/touch.rs index 4d1c9772c..695cc3a0d 100644 --- a/src/uu/touch/src/touch.rs +++ b/src/uu/touch/src/touch.rs @@ -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!(