]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Add a path test
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 22 Dec 2020 17:23:59 +0000 (17:23 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 22 Dec 2020 17:23:59 +0000 (17:23 +0000)
test/lua/unit/url.lua

index bd5fc062c17f872116aa018c9a7c259a77ad02d5..97eda91c6ad129691e2b9d62b35bd8588cb223a0 100644 (file)
@@ -184,10 +184,11 @@ context("URL check functions", function()
     {"..", "/"},
     {"/../", "/"},
     {"../", "/"},
+    {"///foo", "/foo"},
   }
 
   for i,v in ipairs(cases) do
-    test("Normalize paths " .. i, function()
+    test(string.format("Normalize paths '%s'", v[1]), function()
       local buf = ffi.new("uint8_t[?]", #v[1])
       local sizbuf = ffi.new("size_t[1]")
       ffi.copy(buf, v[1], #v[1])