From 151903307c6d0545d0e747174519eda70b846ce1 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Wed, 14 Jan 2015 21:45:49 -0800 Subject: Added pathological tests to test.js. The nested brackets test reveals some issue there. --- js/test.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'js') diff --git a/js/test.js b/js/test.js index 49a5a68..b231b21 100755 --- a/js/test.js +++ b/js/test.js @@ -134,7 +134,7 @@ fs.readFile('spec.txt', 'utf8', function(err, data) { } cursor.write('\n'); console.timeEnd("Elapsed time"); -/* + // pathological cases cursor.write('\nPathological cases:\n'); @@ -150,13 +150,17 @@ fs.readFile('spec.txt', 'utf8', function(err, data) { input: repeat('[', 10000) + 'a' + repeat(']', 10000), expected: '

' + repeat('[', 10000) + 'a' + repeat(']', 10000) + '

\n' }, + { name: 'nested block quote 10000 deep', + input: repeat('> ', 10000) + 'a\n', + expected: repeat('
\n', 10000) + '

a

\n' + + repeat('
\n', 10000) } ]; for (var i = 0; i < cases.length; i++) { pathologicalTest(cases[i], results); } cursor.write('\n'); -*/ - cursor.write('\n' + results.passed.toString() + ' tests passed, ' + + + cursor.write(results.passed.toString() + ' tests passed, ' + results.failed.toString() + ' failed.\n'); }); -- cgit v1.2.3