diff options
author | John MacFarlane <jgm@berkeley.edu> | 2015-01-14 21:45:49 -0800 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2015-01-14 21:45:49 -0800 |
commit | 151903307c6d0545d0e747174519eda70b846ce1 (patch) | |
tree | 79cd4e0abdcfed2ea698e6416fb16150b1276943 /js | |
parent | d042b7cf47390039fe9d04c9e41cc272263a25db (diff) |
Added pathological tests to test.js.
The nested brackets test reveals some issue there.
Diffstat (limited to 'js')
-rwxr-xr-x | js/test.js | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -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: '<p>' + repeat('[', 10000) + 'a' + repeat(']', 10000) + '</p>\n' }, + { name: 'nested block quote 10000 deep', + input: repeat('> ', 10000) + 'a\n', + expected: repeat('<blockquote>\n', 10000) + '<p>a</p>\n' + + repeat('</blockquote>\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'); }); |