From 473be12818f9109f61b2f7e17c9613bd8789a8bc Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Fri, 30 Aug 2019 16:54:17 -0700 Subject: [PATCH] Add pathological test for #172 illustrating quadratic time bug. --- test/test.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/test.js b/test/test.js index 253a5845..00d8273c 100755 --- a/test/test.js +++ b/test/test.js @@ -197,6 +197,12 @@ for (x=1000; x <= 10000; x *= 10) { input: "a**b" + repeat("c* ", x), expected: '

a**b' + repeat('c* ', x - 1) + 'c*

\n' }); } +for (x=1000; x <= 10000; x *= 10) { + cases.push( + { name: x + ' #172', + input: repeat('*_* _ ', x), + expected: '

' + repeat('_ _ ', x - 1) + '_ _

\n' }); +} for (x = 1000; x <= 10000; x *= 10) { cases.push( { name: x + ' link closers with no openers',