summaryrefslogtreecommitdiffstats
path: root/pigeonhole/tests/execute/examples.svtest
blob: 6143018d0e878956677bb87830d74e047905f299 (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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
require "vnd.dovecot.testsuite";

/* Compile and execute all example scripts to trigger
 * any Segfaults. No message is set and no results are checked.
 */

test "Elvey example" {
	if not test_script_compile "../../examples/elvey.sieve" {
		test_fail "could not compile";
	}

	test_binary_save "elvey";
	test_binary_load "elvey";

	if not test_script_run { }
}

test "M. Johnson example" {
	if not test_script_compile "../../examples/mjohnson.sieve" {
		test_fail "could not compile";
	}

	test_binary_save "mjohnson";
	test_binary_load "mjohnson";

	if not test_script_run { }
}

test "RFC 3028 example" {
	if not test_script_compile "../../examples/rfc3028.sieve" {
		test_fail "could not compile";
	}

	test_binary_save "rfc3028";
	test_binary_load "rfc3028";

	if not test_script_run { }
}

test "Sieve examples" {
	if not test_script_compile "../../examples/sieve_examples.sieve" {
		test_fail "could not compile";
	}

	test_binary_save "sieve_examples";
	test_binary_load "sieve_examples";

	if not test_script_run { }
}

test "Vivil example" {
	if not test_script_compile "../../examples/vivil.sieve" {
		test_fail "could not compile";
	}

	test_binary_save "vivil";
	test_binary_load "vivil";

	if not test_script_run { }
}

test "Jerry example" {
	if not test_script_compile "../../examples/jerry.sieve" {
		test_fail "could not compile";
	}

	test_binary_save "jerry";
	test_binary_load "jerry";

	if not test_script_run { }
}

test "M. Klose example" {
	if not test_script_compile "../../examples/mklose.sieve" {
		test_fail "could not compile";
	}

	test_binary_save "mklose";
	test_binary_load "mklose";

	if not test_script_run { }
}

test "Sanjay example" {
	if not test_script_compile "../../examples/sanjay.sieve" {
		test_fail "could not compile";
	}

	test_binary_save "sanjay";
	test_binary_load "sanjay";

	if not test_script_run { }
}

test "Relational (RFC5231) example" {
	if not test_script_compile "../../examples/relational.rfc5231.sieve" {
		test_fail "could not compile";
	}

	test_binary_save "relational";
	test_binary_load "relational";

	if not test_script_run { }
}

test "Subaddress (RFC5233) example" {
	if not test_script_compile "../../examples/subaddress.rfc5233.sieve" {
		test_fail "could not compile";
	}

	test_binary_save "subaddress";
	test_binary_load "subaddress";

	if not test_script_run { }
}