96
96
test "Invalid Script Names" {
97
if test_script_compile "errors/scriptname.sieve" {
98
test_fail "compile should have failed";
101
if not test_error :count "eq" :comparator "i;ascii-numeric" "8" {
102
test_fail "wrong number of errors reported";
97
if test_script_compile "errors/scriptname.sieve" {
98
test_fail "compile should have failed";
101
if not test_error :count "eq" :comparator "i;ascii-numeric" "8" {
102
test_fail "wrong number of errors reported";
108
test "Include limit" {
109
test_config_set "sieve_include_max_includes" "3";
110
test_config_reload :extension "include";
112
if test_script_compile "errors/include-limit.sieve" {
113
test_fail "compile should have failed";
116
if not test_error :count "eq" :comparator "i;ascii-numeric" "2" {
117
test_fail "wrong number of errors reported";
120
test_config_set "sieve_include_max_includes" "255";
121
test_config_reload :extension "include";
123
if not test_script_compile "errors/include-limit.sieve" {
124
test_fail "compile should have succeeded";
131
test_config_set "sieve_include_max_nesting_depth" "2";
132
test_config_reload :extension "include";
134
if test_script_compile "errors/depth-limit.sieve" {
135
test_fail "compile should have failed";
138
if not test_error :count "eq" :comparator "i;ascii-numeric" "4" {
139
test_fail "wrong number of errors reported";
142
test_config_set "sieve_include_max_nesting_depth" "10";
143
test_config_reload :extension "include";
145
if not test_script_compile "errors/depth-limit.sieve" {
146
test_fail "compile should have succeeded";