aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2015-04-27 16:12:29 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2015-04-27 16:12:29 +0100
commite97dc6d38007d8b93cf138328963f2789a642527 (patch)
treea97f35c60470b67ab60ac0028bf241d3c6bef169 /test
parent086f56ab615161922749a082a354090b7976c596 (diff)
downloadrspamd-e97dc6d38007d8b93cf138328963f2789a642527.tar.gz
rspamd-e97dc6d38007d8b93cf138328963f2789a642527.zip
Fix closure lifetime in tests.
Diffstat (limited to 'test')
-rw-r--r--test/lua/unit/url.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/lua/unit/url.lua b/test/lua/unit/url.lua
index 6d09fcb3f..d56d06405 100644
--- a/test/lua/unit/url.lua
+++ b/test/lua/unit/url.lua
@@ -10,12 +10,12 @@ context("URL check functions", function()
unsigned ottery_rand_range(unsigned top);
]]
- local pool = mpool.create()
local test_dir = string.gsub(debug.getinfo(1).source, "^@(.+/)[^/]+$", "%1")
ffi.C.rspamd_url_init(string.format('%s/%s', test_dir, "test_tld.dat"))
test("Extract urls from text", function()
+ local pool = mpool.create()
local cases = {
{"test.com text", {"test.com", nil}},
{"test.com. text", {"test.com", nil}},
@@ -45,7 +45,7 @@ context("URL check functions", function()
assert_equal(c[2][2], t['user'])
end
end
+ pool:destroy()
end)
- pool:destroy()
end) \ No newline at end of file