mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 11:37:44 +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::seq::SliceRandom;
|
||||||
use rand::Rng;
|
use rand::Rng;
|
||||||
|
use std::env;
|
||||||
use std::ffi::OsString;
|
use std::ffi::OsString;
|
||||||
|
|
||||||
mod fuzz_common;
|
mod fuzz_common;
|
||||||
|
@ -82,6 +83,8 @@ fuzz_target!(|_data: &[u8]| {
|
||||||
args.extend(printf_input.split_whitespace().map(OsString::from));
|
args.extend(printf_input.split_whitespace().map(OsString::from));
|
||||||
let rust_result = generate_and_run_uumain(&args, uumain, None);
|
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) {
|
let gnu_result = match run_gnu_cmd(CMD_PATH, &args[1..], false, None) {
|
||||||
Ok(result) => result,
|
Ok(result) => result,
|
||||||
Err(error_result) => {
|
Err(error_result) => {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue