From 806beade25b4366c7d8ff173028e141ef1d1728a Mon Sep 17 00:00:00 2001 From: Michael Howell Date: Fri, 1 Mar 2024 13:30:03 -0700 Subject: [PATCH] Add new pathological test from cmark upstream (#1008) --- test/pathological.json | 2 +- test/pathological.mjs | 16 ++++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/test/pathological.json b/test/pathological.json index dee307c..de229ba 100644 --- a/test/pathological.json +++ b/test/pathological.json @@ -1 +1 @@ -{ "md5": "68c7c28fe0d4a34367f27dcbceec9fed" } +{ "md5": "80e12450752e4667b3656fa2cd12e9d5" } diff --git a/test/pathological.mjs b/test/pathological.mjs index d9f8591..c2db10f 100644 --- a/test/pathological.mjs +++ b/test/pathological.mjs @@ -114,6 +114,10 @@ describe('Pathological sequences speed', () => { await test_pattern(Array(1000).fill(0).map(function (_, x) { return ' '.repeat(x) + '* a\n' }).join('')) }) + it('U+0000 in input', async () => { + await test_pattern('abc\u0000de\u0000'.repeat(100000)) + }) + it('backticks', async () => { await test_pattern(Array(3000).fill(0).map(function (_, x) { return 'e' + '`'.repeat(x) }).join('')) }) @@ -129,6 +133,18 @@ describe('Pathological sequences speed', () => { it('unclosed