summaryrefslogtreecommitdiffstats
path: root/pigeonhole/tests/extensions/relational/errors.svtest
blob: 0973b980104d9f24884a87d185a1b29220672d46 (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
require "vnd.dovecot.testsuite";

# A bit awkward to test the extension with itself
require "relational";
require "comparator-i;ascii-numeric";

/*
 * Syntax errors
 */

test "Syntax errors" {
	if test_script_compile "errors/syntax.sieve" {
		test_fail "compile should have failed";
	}

	if test_error :count "ne" "6" {
		test_fail "wrong number of errors reported";
	}
}

/*
 * Validation errors
 */

test "Validation errors" {
	if test_script_compile "errors/validation.sieve" {
		test_fail "compile should have failed";
	}

	if test_error :count "ne" "3" {
		test_fail "wrong number of errors reported";
	}
}