1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-28 19:47:45 +00:00

Don't assume tests are running on a computer with an English locale.

This commit is contained in:
Valentin Lorentz 2018-04-22 08:07:38 +02:00
parent 5f9bb70422
commit 248f480b41
3 changed files with 3 additions and 3 deletions

View file

@ -48,5 +48,5 @@ fn test_short_format() {
#[cfg(target_os = "linux")] #[cfg(target_os = "linux")]
fn expected_result(args: &[&str]) -> String { fn expected_result(args: &[&str]) -> String {
TestScenario::new(util_name!()).cmd_keepenv(util_name!()).args(args).run().stdout TestScenario::new(util_name!()).cmd_keepenv(util_name!()).env("LANGUAGE", "C").args(args).run().stdout
} }

View file

@ -235,6 +235,6 @@ fn test_printf() {
fn expected_result(args: &[&str]) -> String { fn expected_result(args: &[&str]) -> String {
use std::process::Command; use std::process::Command;
let output = Command::new(util_name!()).args(args).output().unwrap(); let output = Command::new(util_name!()).env("LANGUAGE", "C").args(args).output().unwrap();
String::from_utf8_lossy(&output.stdout).into_owned() String::from_utf8_lossy(&output.stdout).into_owned()
} }

View file

@ -68,5 +68,5 @@ fn test_all() {
#[cfg(target_os = "linux")] #[cfg(target_os = "linux")]
fn expected_result(arg: &str) -> String { fn expected_result(arg: &str) -> String {
TestScenario::new(util_name!()).cmd_keepenv(util_name!()).args(&[arg]).run().stdout TestScenario::new(util_name!()).cmd_keepenv(util_name!()).env("LANGUAGE", "C").args(&[arg]).run().stdout
} }