mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 03:27:44 +00:00
fuzz: add the capability to pipe info into fuzz (#5668)
* fuzz: add the capability to pipe info into fuzz * address the comments * show the piped message if any
This commit is contained in:
parent
6510115d9e
commit
546201bd00
7 changed files with 101 additions and 31 deletions
|
@ -69,9 +69,9 @@ fuzz_target!(|_data: &[u8]| {
|
|||
// because uutils expr doesn't support localization yet
|
||||
// TODO remove once uutils expr supports localization
|
||||
env::set_var("LC_COLLATE", "C");
|
||||
let rust_result = generate_and_run_uumain(&args, uumain);
|
||||
let rust_result = generate_and_run_uumain(&args, uumain, None);
|
||||
|
||||
let gnu_result = match run_gnu_cmd(CMD_PATH, &args[1..], false) {
|
||||
let gnu_result = match run_gnu_cmd(CMD_PATH, &args[1..], false, None) {
|
||||
Ok(result) => result,
|
||||
Err(error_result) => {
|
||||
eprintln!("Failed to run GNU command:");
|
||||
|
@ -88,6 +88,7 @@ fuzz_target!(|_data: &[u8]| {
|
|||
compare_result(
|
||||
"expr",
|
||||
&format!("{:?}", &args[1..]),
|
||||
None,
|
||||
&rust_result,
|
||||
&gnu_result,
|
||||
false, // Set to true if you want to fail on stderr diff
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue