Initial impl
This commit is contained in:
commit
4b729c5d32
133 files changed
+20475
No files matched your search
@@ -0,0 +1,16 @@
|
||||
#![no_main]
|
||||
|
||||
use libfuzzer_sys::fuzz_target;
|
||||
use reqlite_core::httpfile::HttpFile;
|
||||
|
||||
fuzz_target!(|data: &str| {
|
||||
let f = HttpFile::parse(data);
|
||||
assert_eq!(f.write(), data);
|
||||
for i in 0..f.request_count() {
|
||||
let r = f.request(i).unwrap().clone();
|
||||
assert_eq!(f.replace_request(i, &r).unwrap(), data);
|
||||
let src = f.request_source(i).unwrap().to_string();
|
||||
let again = HttpFile::parse(f.replace_request_text(i, &src).unwrap());
|
||||
assert_eq!(again.request_count(), f.request_count());
|
||||
}
|
||||
});
|
||||
Reference in new issue
Block a user