summaryrefslogtreecommitdiff
path: root/tests/fuzz/src/parse.rs
diff options
context:
space:
mode:
authorNathaniel Brough <nathaniel.brough@gmail.com>2023-12-05 10:26:58 -0800
committerGitHub <noreply@github.com>2023-12-05 19:26:58 +0100
commit9aadb18186c0804f6cc6179bf8ea993337dc669d (patch)
tree95cc87193e1b9d1255b45894830ba98b372bde5f /tests/fuzz/src/parse.rs
parent0ebce56b36ea2a875609949f4da81c9ca6a4a081 (diff)
Add simple fuzz testing (#2581)
Diffstat (limited to 'tests/fuzz/src/parse.rs')
-rw-r--r--tests/fuzz/src/parse.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/fuzz/src/parse.rs b/tests/fuzz/src/parse.rs
new file mode 100644
index 00000000..f151661a
--- /dev/null
+++ b/tests/fuzz/src/parse.rs
@@ -0,0 +1,8 @@
+#![no_main]
+
+use libfuzzer_sys::fuzz_target;
+use typst_syntax::parse;
+
+fuzz_target!(|text: &str| {
+ std::hint::black_box(parse(text));
+});