mirror of
https://github.com/uutils/coreutils
synced 2024-11-14 00:47:11 +00:00
fuzzing: set LC_ALL=C when running GNU printf
This commit is contained in:
parent
420dfe8a9b
commit
89bad851e6
1 changed files with 3 additions and 0 deletions
|
@ -10,6 +10,7 @@ use uu_printf::uumain;
|
|||
|
||||
use rand::seq::SliceRandom;
|
||||
use rand::Rng;
|
||||
use std::env;
|
||||
use std::ffi::OsString;
|
||||
|
||||
mod fuzz_common;
|
||||
|
@ -82,6 +83,8 @@ fuzz_target!(|_data: &[u8]| {
|
|||
args.extend(printf_input.split_whitespace().map(OsString::from));
|
||||
let rust_result = generate_and_run_uumain(&args, uumain, None);
|
||||
|
||||
// TODO remove once uutils printf supports localization
|
||||
env::set_var("LC_ALL", "C");
|
||||
let gnu_result = match run_gnu_cmd(CMD_PATH, &args[1..], false, None) {
|
||||
Ok(result) => result,
|
||||
Err(error_result) => {
|
||||
|
|
Loading…
Reference in a new issue