mirror of
https://github.com/tailwindlabs/tailwindcss.git
synced 2025-12-08 21:36:08 +00:00
* 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
32 lines
831 B
Rust
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<_>>();
|
|
}
|
|
});
|