aboutsummaryrefslogtreecommitdiffstats
path: root/test/lua
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2015-03-06 13:07:30 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2015-03-06 13:07:30 +0000
commit8272fa5dcda360bc573a3877194a6430c301738c (patch)
tree5ac7b2511733638d38590c4bb956a265ed11a5cd /test/lua
parent2868939004792107fa2dae733667ca934b1cd90e (diff)
downloadrspamd-8272fa5dcda360bc573a3877194a6430c301738c.tar.gz
rspamd-8272fa5dcda360bc573a3877194a6430c301738c.zip
Distinguish match and search in lua regexp.
Diffstat (limited to 'test/lua')
-rw-r--r--test/lua/unit/regxep.lua4
1 files changed, 1 insertions, 3 deletions
diff --git a/test/lua/unit/regxep.lua b/test/lua/unit/regxep.lua
index 5329fece2..81234ddb6 100644
--- a/test/lua/unit/regxep.lua
+++ b/test/lua/unit/regxep.lua
@@ -21,10 +21,8 @@ context("Regexp unit tests", function()
local r = re.create_cached(c[1])
assert_not_nil(r)
local res = r:match(c[2])
- local m = false
- if res then m = true end
- assert_equal(m, c[3], string.format("'%s' doesn't match with '%s'",
+ assert_equal(res, c[3], string.format("'%s' doesn't match with '%s'",
c[2], c[1]))
end
end)