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"; } if not test_error :count "eq" :comparator "i;ascii-numeric" "27" { test_fail "wrong number of errors reported"; } } /* * Metadataexists - bad UTF-8 in mailbox name */ test "Metadataexists - bad UTF-8 in mailbox name" { if not test_script_compile "errors/metadataexists-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"; } } /* * Metadata - bad UTF-8 in mailbox name */ test "Metadata - bad UTF-8 in mailbox name" { if not test_script_compile "errors/metadata-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"; } }