Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 10 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ path = "src/main.rs"

[dependencies]
chrono = "0.4.38"
const_format = "0.2.35"
diff = "0.1.13"
itoa = "1.0.11"
regex = "1.10.4"
Expand Down Expand Up @@ -46,7 +47,14 @@ harness = false

[features]
# default = ["feat_bench_not_diff"]
# Turn bench for diffutils cmp off
# instead of limiting to KiB, MiB, etc, one can write kib, mib, Mb or whatever case.
feat_allow_case_insensitive_number_units = []
# Disable bench for diffutils cmp
feat_bench_not_cmp = []
# Turn bench for diffutils diff off
# Disable bench for diffutils diff
feat_bench_not_diff = []
# Enables a check on options defined in NOT_YET_IMPLEMENTED.
# If on the parser will return an error message in these cases.
# This is preferable when running the util as unsupported options
# are pointed out to the user, but can make tests fail.
feat_check_not_yet_implemented = []
6 changes: 3 additions & 3 deletions fuzz/fuzz_targets/fuzz_side.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ extern crate libfuzzer_sys;

use diffutilslib::side_diff;

use diffutilslib::params::Params;
use std::fs::File;
use std::io::Write;
use diffutilslib::params::Params;

fuzz_target!(|x: (Vec<u8>, Vec<u8>, /* usize, usize */ bool)| {
let (original, new, /* width, tabsize, */ expand) = x;
Expand All @@ -22,7 +22,7 @@ fuzz_target!(|x: (Vec<u8>, Vec<u8>, /* usize, usize */ bool)| {
..Default::default()
};
let mut output_buf = vec![];
side_diff::diff(&original, &new, &mut output_buf, &params);
side_diff::diff(&original, &new, &mut output_buf, &(&params).into());
File::create("target/fuzz.file.original")
.unwrap()
.write_all(&original)
Expand All @@ -39,4 +39,4 @@ fuzz_target!(|x: (Vec<u8>, Vec<u8>, /* usize, usize */ bool)| {
.unwrap()
.write_all(&output_buf)
.unwrap();
});
});
Loading
Loading