fix(fuzz): update fuzz test target
This commit is contained in:
parent
c3b07fdd9e
commit
a8861cbe9c
|
@ -7,10 +7,9 @@ publish = false
|
|||
[package.metadata]
|
||||
cargo-fuzz = true
|
||||
|
||||
[dependencies.orgize]
|
||||
path = ".."
|
||||
[dependencies.libfuzzer-sys]
|
||||
git = "https://github.com/rust-fuzz/libfuzzer-sys.git"
|
||||
[dependencies]
|
||||
libfuzzer-sys = { git = "https://github.com/rust-fuzz/libfuzzer-sys.git" }
|
||||
orgize = { path = ".." }
|
||||
|
||||
# Prevent this from interfering with workspaces
|
||||
[workspace]
|
||||
|
|
|
@ -1,13 +1,14 @@
|
|||
#![no_main]
|
||||
|
||||
#[macro_use]
|
||||
extern crate libfuzzer_sys;
|
||||
extern crate orgize;
|
||||
|
||||
use orgize::Parser;
|
||||
use orgize::Org;
|
||||
|
||||
#[cfg_attr(rustfmt, rustfmt_skip)]
|
||||
fuzz_target!(|data: &[u8]| {
|
||||
libfuzzer_sys::fuzz_target!(|data: &[u8]| {
|
||||
if let Ok(s) = std::str::from_utf8(data) {
|
||||
let _ = Parser::new(s).collect::<Vec<_>>();
|
||||
let _ = Org::parse(s);
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue