Noah Hellman
3908823d18
inline: use bytes instead of chars
2023-05-16 17:01:42 +02:00
Noah Hellman
5985d78437
use minimal afl input
...
afl exits early when initial input crashes, which it often does after
large changes
2023-05-15 19:05:22 +02:00
Noah Hellman
7c28a068e9
afl: rm whitelisted html error
...
resolved by "block: replace tree with event vec"
2023-05-15 19:05:22 +02:00
Noah Hellman
e69d61a0d1
afl parse: sanity check spans
2023-05-15 19:05:22 +02:00
Noah Hellman
d19e4933c9
afl: merge parse_balance target into parse
...
parse_balance is a superset of parse
2023-05-15 19:05:22 +02:00
Noah Hellman
b2d15383e7
inline: allow empty span when followed by url/label/attrs
...
allow e.g. images without alt text ![](url)
2023-05-10 22:12:07 +02:00
Noah Hellman
3cea79a122
mv suite{_bench} to test-html-{ut,ref} crates
...
- allow compiling/running html tests without compiling main crate tests
(useful when e.g. making type changes to events but html unaffected)
- avoid need for future flags in main crate
2023-05-04 19:34:23 +02:00
Noah Hellman
ebe7a913bf
suite: add footnotes unit tests
...
complementary to ones borrowed from djot.js suite
2023-04-25 21:03:18 +02:00
Noah Hellman
91ae737be3
suite: prepend djot_js tests
...
avoid name conflicts when adding own tests
2023-04-25 21:03:18 +02:00
Noah Hellman
3c17d6df49
afl: add target parse_balance
...
verify all containers are balanced
2023-04-10 18:50:21 +02:00
Noah Hellman
bee3d5d747
bench/suite_bench: use snake case for input files
...
rust identifiers may not contain -
use _ for files also to avoid confusion of having two names
2023-04-10 11:49:03 +02:00
Noah Hellman
9bdb4c59fc
suite make: specify gawk
...
broken for e.g. nawk
TODO: fix to work with any awk or replace awk script with something else
(e.g. separate crate with build.rs?)
2023-04-09 16:17:14 +02:00
Noah Hellman
62d33effc4
inline: parse multiline attributes
...
reimplement after broken by "take str per line instead of full inline
iter" commit
also resolves #18 and #34
2023-04-05 21:17:33 +02:00
Noah Hellman
a846477cea
inline: parse multi-line link tags/urls
...
reimplement after broken by "take str per line instead of full inline
iter" commit
this also resolves #22
2023-04-05 21:17:33 +02:00
Noah Hellman
8169feb1f6
inline: impl links w/o lookahead
...
needed to get rid of DiscontinuousChars
2023-04-05 21:17:33 +02:00
Noah Hellman
e8503e28fd
lib: add Render::render_{event, prologue, epilogue}
...
derive push/write automatically from these
2023-04-05 21:17:33 +02:00
Noah Hellman
a603ea2124
lib: Add SpanLinkTag::Unresolved variant
...
keep the tag for unresolved links, and allow distinguishing between
`[tag][tag with empty url]` and `[tag][non-existent tag]`.
closes #26
2023-04-05 21:17:32 +02:00
Noah Hellman
0d884a65d5
afl: add debug feature
...
leave out debug prints when actually fuzzing to increase fuzz
performance
2023-03-17 18:45:20 +01:00
Noah Hellman
9a7c57f524
afl: add html target, checking for invalid html
2023-03-17 18:45:20 +01:00
Noah Hellman
8f70f596b9
afl: add main file
...
for testing that crashes have been resolved
previously, binary of the main crate was used, but targets may have more
validation than simply checking for panics
2023-03-17 18:45:20 +01:00
Noah Hellman
3e56903885
afl: mv parse target impl to lib
2023-03-17 18:45:20 +01:00
Noah Hellman
2606e2f4fc
afl: gen -> parse, parse only
2023-03-17 18:45:20 +01:00
kmaasrud
e3f39d4b88
feat: support escapes in attributes
...
Related issue: #1
2023-03-12 08:19:56 +01:00
Noah Hellman
119f59b349
test suite: skip rustfmt on generated modules
...
may not exist or have trailing newline
2023-02-12 00:59:18 +01:00
Noah Hellman
619c5ef048
test suite: add test skip/ignore/blacklist
...
some unit tests are not passing, ignore them for now in order to allow
testing for regressions for the currently passing tests.
run ignored tests with
cargo test --features suite -- --ignored
2023-02-12 00:59:18 +01:00
Noah Hellman
1221a003ba
test suite: use md5 of input as test name
...
in order to keep same name, if order of test would change
2023-02-12 00:59:18 +01:00
Noah Hellman
38666a86f8
suite_bench: add bench input skip/ignore/blacklist
...
some benchmark input files have different output from reference
implementation, ignore them for now in order to allow testing for
regressions for the currently passing inputs.
run ignored tests with
cargo test --features=suite_bench -- --ignored
2023-02-12 00:59:18 +01:00
Noah Hellman
ff6f1554e2
test suite: use new render html api
2023-02-11 20:23:00 +01:00
kmaasrud
d7f2c0a819
implement Render trait for html::Renderer
2023-02-10 09:46:18 +01:00
Noah Hellman
768699d138
optionally use btree maps instead of hash maps
...
btree maps are deterministic which is useful for fuzzing. hash maps,
however have better performance in our case
2023-02-05 20:36:49 +01:00
Noah Hellman
28c2bfbe8c
add afl fuzz target
2023-02-05 20:36:49 +01:00
Noah Hellman
08332bed5e
test suite: add djot.js bench files as tests
2023-02-05 20:36:40 +01:00
Noah Hellman
6c630798f8
spec tests: filter out non-applicable test files
2023-02-05 20:36:40 +01:00
Noah Hellman
8c0abca85f
add spec tests
2023-02-05 20:36:38 +01:00