Skip to content
Snippets Groups Projects
Commit 45c19dad authored by Stephan Bosch's avatar Stephan Bosch
Browse files

Testsuite: added compile error tests for the include extension.

parent 718c4b72
No related branches found
No related tags found
No related merge requests found
......@@ -37,6 +37,7 @@ test_cases = \
tests/extensions/variables/string.svtest \
tests/extensions/variables/errors.svtest \
tests/extensions/include/variables.svtest \
tests/extensions/include/errors.svtest \
tests/extensions/imapflags/basic.svtest \
tests/extensions/imapflags/hasflag.svtest \
tests/compile/compile.svtest \
......
require "vnd.dovecot.testsuite";
require "relational";
require "comparator-i;ascii-numeric";
/*
* Using import/export without variables required
*/
test "Variables inactive" {
if test_compile "errors/variables-inactive.sieve" {
test_fail "compile should have failed";
}
if not test_error :count "eq" :comparator "i;ascii-numeric" "3" {
test_fail "wrong number of errors reported";
}
}
/*
* Generic variables errors
*/
test "Variables" {
if test_compile "errors/variables.sieve" {
test_fail "compile should have failed";
}
if not test_error :count "eq" :comparator "i;ascii-numeric" "5" {
test_fail "wrong number of errors reported";
}
}
require "include";
require "fileinto";
import "friep";
export "frop";
fileinto "Frop";
require "include";
require "variables";
# Importing unknown variable
import "frop";
# Importing unknown variable
import ["friep", "frml"];
# Not an error
export ["friep"];
import "friep";
keep;
export "friep";
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment

Consent

On this website, we use the web analytics service Matomo to analyze and review the use of our website. Through the collected statistics, we can improve our offerings and make them more appealing for you. Here, you can decide whether to allow us to process your data and set corresponding cookies for these purposes, in addition to technically necessary cookies. Further information on data protection—especially regarding "cookies" and "Matomo"—can be found in our privacy policy. You can withdraw your consent at any time.