Nick Wellnhofer
dfb1526b38
spec_tests.py: Add option to generate fuzz corpus
...
Add an option `--fuzz-corpus` that writes the test cases to separate
files including the options header, so they can be used as seed corpus
for fuzz testing.
2023-02-02 08:03:29 -08:00
John MacFarlane
0e5ae6eb0e
Add new pathological test for pattern "![[]()"*n
.
...
This was formerly quadratic.
2023-01-23 10:24:40 -08:00
John MacFarlane
511efeb93f
Add pathological test for repeated '<!--'.
2023-01-13 09:22:53 -08:00
John MacFarlane
b1d961c8f7
Allow declarations with no space, as per spec. Closes #456 .
2022-11-03 08:57:23 -07:00
John MacFarlane
8be7f66ab4
Allow <!DOCTYPE
to be case-insensitive.
...
(This conforms to the existing spec.)
2022-09-21 11:01:12 -07:00
John MacFarlane
4470ff3381
Fixed HTML comment scanning.
...
Need to handle this case: `<!--> and -->`.
Since the scanner finds the longest match, we had to
move some of the logic outside of the scanner.
2022-09-08 10:50:03 -07:00
John MacFarlane
1db08eacc1
Revert "Update spec.txt"
...
This reverts commit c0459ddf20
.
2022-08-23 08:55:33 -07:00
John MacFarlane
eb54ef4d68
pathological tests: half the number of repetitions, and the timeout.
...
This reduces the time needed for the pathological tests.
2022-08-13 14:01:52 -07:00
John MacFarlane
c0459ddf20
Update spec.txt
2022-08-13 13:52:54 -07:00
Dimitris Apostolou
72549a214a
Fix typos
2022-01-03 23:57:22 -08:00
Nick Wellnhofer
2dca096d8e
Fix quadratic behavior involving get_containing_block
...
Fix quadratic behavior in the Commonmark renderer when determining the
tight list status in deeply nested inlines.
Instead of searching for the containing block, update the tight list
status when
- entering a child of a list item
- exiting a list
Fixes #431 .
2021-12-03 10:05:19 -08:00
Nick Wellnhofer
99b48963a2
Fix pathological_tests.py
...
- Use a multiprocessing.Queue to actually get results from spawned
tests processes.
- Fix the allowed_failures test.
- Truncate actual output when printed.
- Prepare for testing pathological behavior of the Commonmark renderer.
2021-12-03 09:28:50 -08:00
Nick Wellnhofer
4efec3552c
Fix parsing of emphasis before links
...
Fix a regression introduced with commit ed0a4bf
. Also test the first
delimiter against stack_bottom in process_emphasis. This happened to
work with the old code and only resulted in an unnecessary scan.
Fixes #424 .
2021-09-24 08:39:25 -07:00
John MacFarlane
6f6d1254f8
Add pathological test for #389 .
2021-07-16 15:16:32 -07:00
John MacFarlane
63b9b038b6
Use official 0.30 spec.txt.
2021-06-20 09:19:43 -07:00
John MacFarlane
ba699f98c0
Fix regression test for #383
2021-06-15 11:01:24 -07:00
John MacFarlane
cd26ccb082
Add failing regression test for #383 .
2021-06-15 09:21:42 -07:00
John MacFarlane
889723b3c9
Update spec.txt
2021-06-15 09:19:21 -07:00
John MacFarlane
5acc7d48c7
Fix issue with type-7 HTML blocks interrupting paragraphs.
...
See commonmark/commonmark.js#213 .
2021-02-06 22:57:34 -08:00
John MacFarlane
f20963d56f
Increase timeout for pathological tests to avoid CI failure
2020-12-03 11:06:44 -08:00
John MacFarlane
59a8bd1e99
Increase timeout for pathological tests.
...
We were having failures on some CI machines.
2020-08-24 09:53:57 -07:00
John MacFarlane
33bf2cfdf6
Update spec.txt.
2020-07-12 16:21:04 -07:00
John MacFarlane
9e5209054c
Revert "spec_tests.py: ignore line endings on diff."
...
This reverts commit 54c990d173
.
2020-05-12 23:21:53 -07:00
John MacFarlane
54c990d173
spec_tests.py: ignore line endings on diff.
2020-05-12 23:17:07 -07:00
John MacFarlane
9411fe7146
Revert "spec_tests.py: don't keep line endings (for windows CI)."
...
This reverts commit abc45c57d3
.
2020-05-12 23:09:51 -07:00
John MacFarlane
abc45c57d3
spec_tests.py: don't keep line endings (for windows CI).
2020-05-12 23:07:09 -07:00
John MacFarlane
74e8f638ad
Skip UTF-8 BOM if present at beginning of buffer.
...
Closes #334 .
2020-03-03 15:05:32 -08:00
John MacFarlane
04936d6323
Add pathological test for reference collisions (see #220 ).
...
This is taken from GitHub's fix:
66a0836dc9
2020-02-16 08:40:39 -08:00
Nick Wellnhofer
4ac601f05d
Fix pathological_tests.py on Windows
...
When using multiprocessing on Windows, the main program must be
guarded with a __name__ check.
2020-01-15 07:04:27 -08:00
Nick Wellnhofer
6b64a95713
Remove useless __name__ check in test scripts
...
These checks don't seem to be required and broke pathological_tests.py
on Windows where multiprocessing sets __name__ to "__mp_main__".
2020-01-15 07:04:27 -08:00
John MacFarlane
00557b43e2
Include string.h in cmark-fuzz.c.
...
Recommended by build log at
https://oss-fuzz-build-logs.storage.googleapis.com/log-6a7500a1-8617-42c6-b8e4-78cab009b5b5.txt
2020-01-05 12:34:30 -08:00
John MacFarlane
68c3a91166
normalize.py: use html.escape instead of cgi.escape.
...
Closes #313 .
2019-11-27 22:05:20 -08:00
John MacFarlane
d4711bb865
Updaet spec.txt.
2019-11-11 12:38:43 -08:00
Johel Ernesto Guerrero Peña
8181cd0f13
Clarify which backtick strings ( #301 )
...
A code span can have more than its two surrounding ones, like ` `` `.
2019-06-01 15:09:11 -04:00
John MacFarlane
5713f6b25a
Update spec.
2019-04-07 08:40:02 -07:00
John MacFarlane
5d4928aff8
Update spec.
2019-04-06 23:24:19 -07:00
John MacFarlane
b93c3884b7
Update spec.
2019-04-06 21:55:04 -07:00
John MacFarlane
5901a87004
Update spec.
2019-04-06 21:42:23 -07:00
John MacFarlane
6f1f4e3120
Update spec.
2019-04-06 10:18:56 -07:00
John MacFarlane
cffc51b198
Update spec.
2019-04-04 22:05:00 -07:00
John MacFarlane
732207b001
Update spec
2019-04-03 10:24:29 -07:00
John MacFarlane
e3990d751b
Update spec.txt.
2019-03-26 12:20:08 -07:00
John MacFarlane
ec97a06d8a
Update regression tests in light of recent spec changes...
...
affecting link destinations.
2019-03-26 12:19:50 -07:00
John MacFarlane
549a713808
Add regression test for #517 .
2019-03-25 22:06:55 -07:00
John MacFarlane
41c6d276ef
Update test/spec.txt
2019-03-25 22:06:50 -07:00
John MacFarlane
660990612f
Update spec; allow internal delimiter runs to match if...
...
both have lengths that are multiples of 3.
See commonmark/commonmark#528 .
2019-03-23 09:21:12 -07:00
John MacFarlane
be18e71f5b
Update spec. Fix [link](<foo\>)
.
2019-03-19 17:46:23 -07:00
John MacFarlane
325a1471d2
Make rendering safe by default.
...
Removes CMARK_OPT_SAFE from options.
Adds CMARK_OPT_UNSAFE, with the opposite meaning.
The new default behavior is to suppress raw HTML and
potentially dangerous links. The CMARK_OPT_UNSAFE
option has to be set explicitly to prevent this.
--------------------------------------------------------
NOTE: This change will require modifications in
bindings for cmark and in most libraries and programs
that use cmark.
--------------------------------------------------------
Closes #239 , #273 .
Borrows heavily from @kivikakk's patch in github/cmark-gfm#123 .
2019-03-17 22:43:38 -07:00
John MacFarlane
ca8ef74a8d
Merge pull request #254 from github/empty-input
...
Check for empty buffer when rendering
2019-03-17 23:03:54 -06:00
John MacFarlane
478195cad7
Add pathological test for #285 .
2019-03-17 10:30:12 -07:00