From 819d1ebb624c946f383bcea54f6b4363a1fa0153 Mon Sep 17 00:00:00 2001 From: sanine Date: Mon, 15 Aug 2022 16:19:46 -0500 Subject: add marigold.percentDecode --- test.lua | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'test.lua') diff --git a/test.lua b/test.lua index a464324..adc166e 100755 --- a/test.lua +++ b/test.lua @@ -162,3 +162,10 @@ test("marigold.html correctly renders children", function()

p2

]]) end) + + +test("marigold.percentDecode correctly decodes percent-encoded strings", function() + local str = '%20%21%23%24%25%26%27%28%29%2A%2B%2C%2F%3A%3B%3D%3F%40%5B%5D' + assert(marigold.percentDecode(str) == " !#$%&'()*+,/:;=?@[]") + assert(marigold.percentDecode('%25+%2b') == '%++') +end) -- cgit v1.2.1