From 632ffdc21a753623620a2919bad6c6283e08b337 Mon Sep 17 00:00:00 2001 From: Stephan Bosch <stephan@rename-it.nl> Date: Sun, 14 Sep 2008 20:54:05 +0200 Subject: [PATCH] Testsuite: added execution tests for core actions (to find segfaults). --- Makefile.am | 11 ++++--- tests/execute/actions.svtest | 31 +++++++++++++++++++ .../execute/actions}/fileinto.sieve | 0 .../execute/actions}/redirect.sieve | 0 tests/extensions/reject/execute.svtest | 9 ++++++ 5 files changed, 46 insertions(+), 5 deletions(-) create mode 100644 tests/execute/actions.svtest rename {sieve/tests => tests/execute/actions}/fileinto.sieve (100%) rename {sieve/tests => tests/execute/actions}/redirect.sieve (100%) diff --git a/Makefile.am b/Makefile.am index 43e40031b..bd7624aa5 100644 --- a/Makefile.am +++ b/Makefile.am @@ -20,6 +20,11 @@ TESTSUITE_BIN = $(top_srcdir)/src/testsuite/testsuite test_cases = \ tests/testsuite.svtest\ tests/control-structures.svtest \ + tests/compile/compile.svtest \ + tests/compile/examples.svtest \ + tests/compile/errors.svtest \ + tests/execute/errors.svtest \ + tests/execute/actions.svtest \ tests/exists.svtest \ tests/header.svtest \ tests/address.svtest \ @@ -53,11 +58,7 @@ test_cases = \ tests/extensions/subaddress/basic.svtest \ tests/extensions/subaddress/rfc.svtest \ tests/extensions/vacation/errors.svtest \ - tests/extensions/vacation/execute.svtest \ - tests/compile/compile.svtest \ - tests/compile/examples.svtest \ - tests/compile/errors.svtest \ - tests/execute/errors.svtest + tests/extensions/vacation/execute.svtest $(test_cases): @$(TESTSUITE_BIN) $@ diff --git a/tests/execute/actions.svtest b/tests/execute/actions.svtest new file mode 100644 index 000000000..066016728 --- /dev/null +++ b/tests/execute/actions.svtest @@ -0,0 +1,31 @@ +require "vnd.dovecot.testsuite"; + +test_set "message" text: +To: nico@vestingbar.nl +From: stephan@rename-it.nl +Subject: Test + +Test. +. +; + +test "Fileinto" { + if not test_compile "actions/fileinto.sieve" { + test_fail "compile failed"; + } + + if not test_execute { + test_fail "execute failed"; + } +} + +test "Redirect" { + if not test_compile "actions/redirect.sieve" { + test_fail "compile failed"; + } + + if not test_execute { + test_fail "execute failed"; + } +} + diff --git a/sieve/tests/fileinto.sieve b/tests/execute/actions/fileinto.sieve similarity index 100% rename from sieve/tests/fileinto.sieve rename to tests/execute/actions/fileinto.sieve diff --git a/sieve/tests/redirect.sieve b/tests/execute/actions/redirect.sieve similarity index 100% rename from sieve/tests/redirect.sieve rename to tests/execute/actions/redirect.sieve diff --git a/tests/extensions/reject/execute.svtest b/tests/extensions/reject/execute.svtest index e80fe1e27..7400de8bd 100644 --- a/tests/extensions/reject/execute.svtest +++ b/tests/extensions/reject/execute.svtest @@ -1,5 +1,14 @@ require "vnd.dovecot.testsuite"; +test_set "message" text: +To: nico@vestingbar.nl +From: stephan@rename-it.nl +Subject: Test + +Test. +. +; + test "Execute" { if not test_compile "execute/basic.sieve" { test_fail "compile failed"; -- GitLab