To run unit tests only (tests defined in /src
):
cargo test
To run all the available tests including integration tests, C API tests and linting:
./scripts/test.sh
To run only those tests that contain a {substring}
in their name:
./scripts/test.sh {substring}
cargo bench
To run only those benchmarks that contain a {substring}
in their name:
cargo bench {substring}
Test report can be found in the target/criterion/report/index.html
file.
The tool provides comprehensive trace information about parsing process of the given HTML input. For usage information run:
./scripts/parser_trace.sh -- -h
The tool prints selector VM's program AST for the given list of CSS selectors. CSS selector list should be specified in the JSON format:
./scripts/selectors_ast.sh '["selector1", "selector2", ...]'
Fuzzing with cargo-fuzz
NOTE: requires Rust nightly.
Run fuzzing for the crate:
./scripts/fuzz_with_libfuzzer.sh
Run fuzzing for C API:
./scripts/fuzz_c_api_with_libfuzzer.sh
Fuzzing with afl
./scripts/fuzz_with_afl.sh
Fuzzing with honggfuzz
./scripts/fuzz_with_hongg.sh