globset: add opt-in Arbitrary trait implementations

This feature is mandatory when using `Glob` in fuzz testing.

Closes #2720
This commit is contained in:
William Johnson
2024-01-24 11:15:22 -05:00
committed by Andrew Gallant
parent bfe2def121
commit 52115ab633
12 changed files with 358 additions and 1 deletions

25
fuzz/Cargo.toml Normal file
View File

@@ -0,0 +1,25 @@
[package]
name = "fuzz"
version = "0.0.1"
publish = false
edition = "2021"
[package.metadata]
cargo-fuzz = true
[dependencies]
libfuzzer-sys = "0.4"
globset = { path = "../crates/globset", features = ["arbitrary"] }
# Prevent this from interfering with workspaces
[workspace]
members = ["."]
[profile.release]
debug = 1
[[bin]]
name = "fuzz_glob"
path = "fuzz_targets/fuzz_glob.rs"
test = false
doc = false