Diff options
Diffstat (limited to 'tests/extensions/test-link-trailers.lua')
| -rw-r--r-- | tests/extensions/test-link-trailers.lua | 6 |
1 file changed, 6 insertions, 0 deletions
diff --git a/tests/extensions/test-link-trailers.lua b/tests/extensions/test-link-trailers.lua index c4dfdf5..7912d3e 100644 --- a/tests/extensions/test-link-trailers.lua +++ b/tests/extensions/test-link-trailers.lua @@ -106,4 +106,10 @@ out = render("CVE", "CVE-2024-12345") h.equals("the shipped CVE example links to its record", out, "<a href='https://www.cve.org/CVERecord?id=CVE-2024-12345'>CVE-2024-12345</a>") +-- A long value of url starts is checked against the url pattern once, from +-- its start, so it costs no more than its length. +h.stays_linear("a long value is checked in linear time", function(text) + return (render("Link", text)) +end, function(count) return string.rep("http://", count) .. " " end, 10000) + h.finish() |
