From 065d4b113a567567c4c93056d2c04abe877d8f71 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Sun, 5 Apr 2015 19:05:32 +0100 Subject: Fix URL unit test. --- test/lua/unit/url.lua | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'test') diff --git a/test/lua/unit/url.lua b/test/lua/unit/url.lua index 9f9643009..dd6f4b760 100644 --- a/test/lua/unit/url.lua +++ b/test/lua/unit/url.lua @@ -38,9 +38,11 @@ context("URL check functions", function() int form; /* URI originated from form */ int is_phished; /* URI maybe phishing */ }; + struct rspamd_config; struct rspamd_url* rspamd_url_get_next (void *pool, const char *start, char const **pos); void * rspamd_mempool_new (unsigned long size); + void rspamd_url_init (struct rspamd_config *cfg); ]] test("Extract urls from text", function() @@ -52,6 +54,8 @@ context("URL check functions", function() {"http://user:password@тест2.РФ:18 text", {"тест2.рф", "user"}}, } + ffi.C.rspamd_url_init(nil) + for _,c in ipairs(cases) do local res = ffi.C.rspamd_url_get_next(pool, c[1], nil) -- cgit v1.2.3