diff options
Diffstat (limited to 'pigeonhole/tests/extensions/special-use/errors.svtest')
-rw-r--r-- | pigeonhole/tests/extensions/special-use/errors.svtest | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/pigeonhole/tests/extensions/special-use/errors.svtest b/pigeonhole/tests/extensions/special-use/errors.svtest new file mode 100644 index 0000000..49b1872 --- /dev/null +++ b/pigeonhole/tests/extensions/special-use/errors.svtest @@ -0,0 +1,38 @@ +require "vnd.dovecot.testsuite"; + +require "relational"; +require "comparator-i;ascii-numeric"; + +/* + * Invalid syntax + */ + +test "Invalid Syntax" { + if test_script_compile "errors/syntax.sieve" { + test_fail "compile should have failed"; + } + + # FIXME: check warnings + if not test_error :count "eq" :comparator "i;ascii-numeric" "15" { + test_fail "wrong number of errors reported"; + } +} + +/* + * Specialuse_exists - bad UTF-8 in mailbox name + */ + +test "Specialuse_exists - bad UTF-8 in mailbox name" { + if not test_script_compile "errors/specialuse_exists-bad-utf8.sieve" { + test_fail "compile failed"; + } + + if not test_script_run { + test_fail "execution failed"; + } + + # FIXME: check warnings + if not test_error :count "eq" :comparator "i;ascii-numeric" "0" { + test_fail "wrong number of runtime errors reported"; + } +} |