From 5cfbc0985af6caf8ab70a5db391768c4dfd9481a Mon Sep 17 00:00:00 2001 From: Bryce Kwon Date: Sat, 17 Oct 2026 17:09:16 -1000 Subject: 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. --- tests/extensions/test-about-render.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'tests/extensions') 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, "ab") -- cgit