Skip to content

Commit

Permalink
Add pathological tests for #157.
Browse files Browse the repository at this point in the history
  • Loading branch information
jgm committed Mar 11, 2019
1 parent ce34529 commit 02a78d4
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,20 @@ for (x = 1000; x <= 10000; x *= 10) {
expected: repeat('<blockquote>\n', x) + '<p>a</p>\n' +
repeat('</blockquote>\n', x) });
}

for (x = 1000; x <= 10000; x *= 10) {
cases.push(
{ name: '[\\\\... ' + x + ' deep',
input: '[' + repeat('\\', x) + '\n',
expected: '<p>' + '[' + repeat('\\', x/2) + '</p>\n'
});
}
for (x = 1000; x <= 10000; x *= 10) {
cases.push(
{ name: '[]( ' + x + ' deep',
input: repeat('[](', x) + '\n',
expected: '<p>' + repeat('[](', x) + '</p>\n'
});
}
var parse_and_render = function(z) {
return writer.render(reader.parse(z));
};
Expand Down

0 comments on commit 02a78d4

Please sign in to comment.