Robin Malfait 1c48683a23
Hoist oxide/crates to just crates (#13333)
* move `oxide/crates` to `crates`

* ignore `target/` folder

* ensure pnpm points to `crates` instead of `oxide/crates`

* ensure all paths point to `crates` instead of `oxide/crates`

* update `oxide/crates` -> `crates` path in workflows

* use correct path in .prettierignore

* rename `crates/core` to `crates/oxide`

* remove oxide folder

* fix test script to run `cargo test` directly
2024-03-23 09:00:48 -04:00

32 lines
831 B
Rust

#![no_main]
use libfuzzer_sys::fuzz_target;
use std::path::PathBuf;
use tailwindcss_oxide::candidate::scan_files;
use tailwindcss_oxide::candidate::Candidate;
use tailwindcss_oxide::location::Location;
// fuzz_target!(|data: &[u8]| {
// if let Ok(s) = std::str::from_utf8(data) {
// let _ = parse_candidate_strings(s, false);
// }
// });
fuzz_target!(|data: &[u8]| {
if let Ok(s) = std::str::from_utf8(data) {
let _ = scan_files(s, false)
.into_iter()
.map(|(c, _)| {
Candidate::new(
c,
Location {
file: PathBuf::new(),
start: (0, 1),
end: (0, 1),
},
)
})
.collect::<Vec<_>>();
}
});