1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-28 03:27:44 +00:00

fuzz: fix clippy warnings

This commit is contained in:
Sylvestre Ledru 2023-09-28 21:52:26 +02:00
parent e6f9e358d4
commit a576054d42
5 changed files with 13 additions and 13 deletions

View file

@ -84,7 +84,7 @@ fuzz_target!(|_data: &[u8]| {
let mut args = vec![OsString::from("expr")];
args.extend(expr.split_whitespace().map(OsString::from));
let (rust_output, uumain_exit_code) = generate_and_run_uumain(&mut args, uumain);
let (rust_output, uumain_exit_code) = generate_and_run_uumain(&args, uumain);
// Run GNU expr with the provided arguments and compare the output
match run_gnu_cmd(CMD_PATH, &args[1..], true) {
@ -96,16 +96,16 @@ fuzz_target!(|_data: &[u8]| {
println!("GNU code: {}", gnu_exit_code);
panic!("Different error codes");
}
if rust_output != gnu_output {
println!("Expression: {}", expr);
println!("Rust output: {}", rust_output);
println!("GNU output: {}", gnu_output);
panic!("Different output between Rust & GNU");
} else {
if rust_output == gnu_output {
println!(
"Outputs matched for expression: {} => Result: {}",
expr, rust_output
);
} else {
println!("Expression: {}", expr);
println!("Rust output: {}", rust_output);
println!("GNU output: {}", gnu_output);
panic!("Different output between Rust & GNU");
}
}
Err(_) => {