blob: 36024843944824c2ba48f67630b252fb3c5aab9e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
|
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";
}
}
|