diff options
Diffstat (limited to 'pigeonhole/tests/plugins/extprograms/errors.svtest')
-rw-r--r-- | pigeonhole/tests/plugins/extprograms/errors.svtest | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/pigeonhole/tests/plugins/extprograms/errors.svtest b/pigeonhole/tests/plugins/extprograms/errors.svtest new file mode 100644 index 0000000..148f4da --- /dev/null +++ b/pigeonhole/tests/plugins/extprograms/errors.svtest @@ -0,0 +1,32 @@ +require "vnd.dovecot.testsuite"; + +require "relational"; +require "comparator-i;ascii-numeric"; + +/* + * Invalid program names + */ + +test "Invalid Program Names" { + if test_script_compile "errors/programname.sieve" { + test_fail "compile should have failed"; + } + + if not test_error :count "eq" :comparator "i;ascii-numeric" "8" { + test_fail "wrong number of errors reported"; + } +} + +/* + * Invalid arguments + */ + +test "Invalid Arguments" { + if test_script_compile "errors/arguments.sieve" { + test_fail "compile should have failed"; + } + + if not test_error :count "eq" :comparator "i;ascii-numeric" "2" { + test_fail "wrong number of errors reported"; + } +} |