summaryrefslogtreecommitdiff
path: root/test.lua
diff options
context:
space:
mode:
authorsanine <sanine.not@pm.me>2022-08-15 16:19:46 -0500
committersanine <sanine.not@pm.me>2022-08-15 16:19:46 -0500
commit819d1ebb624c946f383bcea54f6b4363a1fa0153 (patch)
treeefeee89155abbf3811eb9e992d13f15ab9986e86 /test.lua
parentdf73dca1a539387a12da632f2dd48e34f08d70d0 (diff)
add marigold.percentDecode
Diffstat (limited to 'test.lua')
-rwxr-xr-xtest.lua7
1 files changed, 7 insertions, 0 deletions
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()
<p>p2</p>
</div>]])
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)