~ubuntu-branches/ubuntu/raring/dovecot/raring

« back to all changes in this revision

Viewing changes to pigeonhole/tests/extensions/include/errors.svtest

  • Committer: Package Import Robot
  • Author(s): Marco Nenciarini
  • Date: 2011-09-19 19:26:48 UTC
  • mfrom: (1.14.4 upstream)
  • mto: (4.8.2 experimental)
  • mto: This revision was merged to the branch mainline in revision 86.
  • Revision ID: package-import@ubuntu.com-20110919192648-ri3sovtiz334yori
Tags: 1:2.0.15-1
* [a22575a] New upstream version 2.0.15: (Closes: #642045)
    + doveadm altmove: Added -r parameter to move mails back to primary
      storage.
    - v2.0.14: Index reading could have eaten a lot of memory in some
      situations
    - doveadm index no longer affects future caching decisions
    - mbox: Fixed crash during mail delivery when mailbox didn't yet have
      GUID assigned to it.
    - zlib+mbox: Fetching last message from compressed mailboxes crashed.
    - lib-sql: Fixed load balancing and error
* [8ce5abc] Update pigeonhole to release 0.2.4
* [87658d2] Add dovecot-solr to dovecot-core's Suggests line.

Show diffs side-by-side

added added

removed removed

Lines of Context:
94
94
 */
95
95
 
96
96
test "Invalid Script Names" {
97
 
        if test_script_compile "errors/scriptname.sieve" {
98
 
                test_fail "compile should have failed";
99
 
        }
100
 
 
101
 
        if not test_error :count "eq" :comparator "i;ascii-numeric" "8" {
102
 
                test_fail "wrong number of errors reported";
103
 
        }
 
97
        if test_script_compile "errors/scriptname.sieve" {
 
98
                test_fail "compile should have failed";
 
99
        }
 
100
 
 
101
        if not test_error :count "eq" :comparator "i;ascii-numeric" "8" {
 
102
                test_fail "wrong number of errors reported";
 
103
        }
 
104
}
 
105
 
 
106
/* Include limit */
 
107
 
 
108
test "Include limit" {
 
109
        test_config_set "sieve_include_max_includes" "3";
 
110
        test_config_reload :extension "include";
 
111
 
 
112
        if test_script_compile "errors/include-limit.sieve" {
 
113
                test_fail "compile should have failed";
 
114
        }
 
115
 
 
116
        if not test_error :count "eq" :comparator "i;ascii-numeric" "2" {
 
117
                test_fail "wrong number of errors reported";
 
118
        }
 
119
 
 
120
        test_config_set "sieve_include_max_includes" "255";
 
121
        test_config_reload :extension "include";
 
122
 
 
123
        if not test_script_compile "errors/include-limit.sieve" {
 
124
                test_fail "compile should have succeeded";
 
125
        }
 
126
}
 
127
 
 
128
/* Depth limit */
 
129
 
 
130
test "Depth limit" {
 
131
        test_config_set "sieve_include_max_nesting_depth" "2";
 
132
        test_config_reload :extension "include";
 
133
 
 
134
        if test_script_compile "errors/depth-limit.sieve" {
 
135
                test_fail "compile should have failed";
 
136
        }
 
137
 
 
138
        if not test_error :count "eq" :comparator "i;ascii-numeric" "4" {
 
139
                test_fail "wrong number of errors reported";
 
140
        }
 
141
 
 
142
        test_config_set "sieve_include_max_nesting_depth" "10";
 
143
        test_config_reload :extension "include";
 
144
 
 
145
        if not test_script_compile "errors/depth-limit.sieve" {
 
146
                test_fail "compile should have succeeded";
 
147
        }
104
148
}