Set up Go for workflows; fix args in more places

This commit is contained in:
Wilson Lin 2020-07-11 01:33:38 +10:00
commit 9faeba3b54
9 changed files with 33 additions and 6 deletions

View file

@ -9,7 +9,9 @@ fn main() {
let path_in_catch = path.clone();
let res = panic::catch_unwind(|| {
let mut contents = fs::read(path_in_catch).unwrap();
let _ = hyperbuild::hyperbuild(&mut contents);
let _ = hyperbuild::hyperbuild(&mut contents, &hyperbuild::Cfg {
minify_js: false,
});
});
if res.is_err() {
let contents = fs::read(path).unwrap();

View file

@ -1,9 +1,11 @@
use afl::fuzz;
use hyperbuild::hyperbuild;
use hyperbuild::{Cfg, hyperbuild};
fn main() {
fuzz!(|data: &[u8]| {
let mut mut_data: Vec<u8> = data.iter().map(|x| *x).collect();
let _ = hyperbuild(&mut mut_data);
let _ = hyperbuild(&mut mut_data, &Cfg {
minify_js: false,
});
});
}