aboutsummaryrefslogtreecommitdiffstats
path: root/test/lua/unit/url.lua
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2017-01-08 18:37:07 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2017-01-08 18:59:56 +0000
commitfbb1cb12a6e0e17a143593adf60483ad1e70fbca (patch)
treedbd2d66bd661e13ba976043fb80966d3f0b6ad60 /test/lua/unit/url.lua
parentf22e29d1bf2b850ff79e5959a19df534744de75f (diff)
downloadrspamd-fbb1cb12a6e0e17a143593adf60483ad1e70fbca.tar.gz
rspamd-fbb1cb12a6e0e17a143593adf60483ad1e70fbca.zip
[Test] More test cases
Diffstat (limited to 'test/lua/unit/url.lua')
-rw-r--r--test/lua/unit/url.lua10
1 files changed, 9 insertions, 1 deletions
diff --git a/test/lua/unit/url.lua b/test/lua/unit/url.lua
index 991c6d0d0..879386bba 100644
--- a/test/lua/unit/url.lua
+++ b/test/lua/unit/url.lua
@@ -135,10 +135,18 @@ context("URL check functions", function()
{"/foo/../../..", "/"},
{"/foo/../../../ton", "/ton"},
{"////../..", "/"},
+ {"./", ""},
+ {"/./", "/"},
+ {"/./././././././", "/"},
+ {"/", "/"},
+ {"/a/b", "/a/b"},
+ {"/a/b/", "/a/b/"},
+ {"..", "/"},
+ {"/../", "/"},
+ {"../", "/"},
}
for _,v in ipairs(cases) do
- print(v[1])
local buf = ffi.new("uint8_t[?]", #v[1])
local sizbuf = ffi.new("size_t[1]")
ffi.copy(buf, v[1], #v[1])