aboutsummaryrefslogtreecommitdiffstats
path: root/test/rspamd_lua_test.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/rspamd_lua_test.c')
-rw-r--r--test/rspamd_lua_test.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/rspamd_lua_test.c b/test/rspamd_lua_test.c
index b87df0f58..15dd3923b 100644
--- a/test/rspamd_lua_test.c
+++ b/test/rspamd_lua_test.c
@@ -25,6 +25,7 @@
static const char *lua_src = BUILDROOT "/test/lua/tests.lua";
extern gchar *lua_test;
+extern gchar *lua_test_case;
extern struct rspamd_main *rspamd_main;
static int
@@ -65,6 +66,11 @@ rspamd_lua_test_func (void)
rspamd_lua_set_globals (rspamd_main->cfg, L, NULL);
+ if (lua_test_case) {
+ lua_pushstring (L, lua_test_case);
+ lua_setglobal (L, "test_pattern");
+ }
+
rspamd_printf ("Starting lua tests\n");
if ((rp = realpath (lua_src, rp_buf)) == NULL) {