diff options
| author | Bryce Kwon <bryce@brycekwon.com> | |
|---|---|---|
| committer | Bryce Kwon <bryce@brycekwon.com> | |
| commit | ||
| parent | ||
| tree | ||
| download | ||
Give the trim timing check room for a slow host
The about-render unit test bounds three renders at one second to catch
the cubic trim coming back. They take 0.1 s natively and three seconds
on an emulated x86_64 host, where the check failed, while the old code
took minutes, so ten seconds still tells the two apart.
Diffstat (limited to '')
| -rw-r--r-- | tests/extensions/test-about-render.lua | 5 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1 file changed, 3 insertions, 2 deletions
diff --git a/tests/extensions/test-about-render.lua b/tests/extensions/test-about-render.lua index cb1c736..e0fde6f 100644 --- a/tests/extensions/test-about-render.lua +++ b/tests/extensions/test-about-render.lua @@ -250,12 +250,13 @@ out = render("README.md", string.rep("*a", 200)) h.check("an emphasis bomb still renders something", #out > 0) -- Trimming a run of spaces must stay linear, or one hostile line holds a --- request for minutes. Both lines below took seconds before. +-- request for minutes. The lines below took minutes before, and the bound +-- leaves room for an emulated host, where they take a few seconds now. local started = os.clock() render("README.md", "# a" .. string.rep(" ", 3000) .. "b") render("README.md", string.rep("# a\n", 50000)) render("README.md", "| a | b |\n|---|---|\n| x" .. string.rep(" ", 40000) .. "y | z |") -h.check("a long run of spaces is trimmed quickly", os.clock() - started < 1) +h.check("a long run of spaces is trimmed quickly", os.clock() - started < 10) out = render("README.md", "| a | b |\n| --- | --- |\n| 1 | 2 |") h.contains("a pipe table renders its head", out, "<thead><tr><th>a</th><th>b</th></tr></thead>") |
