use super::*;
use ntest::timeout;
#[test]
#[timeout(4000)]
fn pathological_emphases() {
let n = 50_000;
let input = "*a_ ".repeat(n).to_string();
let mut exp = format!("<p>{}", input);
exp.pop();
exp += "</p>\n";
html(&input, &exp);
}
#[test]
#[timeout(4000)]
fn pathological_table_columns_1() {
let n = 100_000;
let input = format!("{}{}{}{}", "|", "x|".repeat(n), "\n|", "-|".repeat(n));
let exp = format!("<p>{}</p>\n", input);
html_opts!([extension.table], &input, &exp);
}
#[test]
#[timeout(4000)]
fn pathological_table_columns_2() {
let n = 100_000;
let input = format!(
"{}{}{}{}{}{}",
"|",
"x|".repeat(n),
"\n|",
"-|".repeat(n),
"\n",
"a\n".repeat(n)
);
let extension = parser::options::Extension {
table: true,
..Default::default()
};
markdown_to_html(
&input,
&Options {
extension,
..Default::default()
},
);
}
#[test]
#[timeout(4000)]
fn pathological_footnotes() {
let n = 10_000;
let input = format!("{}{}", "[^1]:".repeat(n), "\n".repeat(n));
let exp = "";
html_opts!([extension.footnotes], &input, &exp);
}