mirror of
https://github.com/uutils/coreutils.git
synced 2026-06-10 15:48:22 -07:00
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:
@@ -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!(
|
||||
|
||||
Reference in New Issue
Block a user