~ubuntu-branches/ubuntu/utopic/dovecot/utopic-proposed

« back to all changes in this revision

Viewing changes to pigeonhole/tests/test-anyof.svtest

  • Committer: Package Import Robot
  • Author(s): James Page
  • Date: 2014-01-08 09:35:49 UTC
  • mfrom: (4.1.35 sid)
  • Revision ID: package-import@ubuntu.com-20140108093549-i72o93pux8p0dlaf
Tags: 1:2.2.9-1ubuntu1
* Merge from Debian unstable, remaining changes:
  + Add mail-stack-delivery package:
    - Update d/rules
    - d/control: convert existing dovecot-postfix package to a dummy
      package and add new mail-stack-delivery package.
    - Update maintainer scripts.
    - Rename d/dovecot-postfix.* to debian/mail-stack-delivery.*
    - d/mail-stack-delivery.preinst: Move previously installed backups and
      config files to a new package namespace.
    - d/mail-stack-delivery.prerm: Added to handle downgrades.
  + Use Snakeoil SSL certificates by default:
    - d/control: Depend on ssl-cert.
    - d/dovecot-core.postinst: Relax grep for SSL_* a bit.
  + Add autopkgtest to debian/tests/*.
  + Add ufw integration:
    - d/dovecot-core.ufw.profile: new ufw profile.
    - d/rules: install profile in dovecot-core.
    - d/control: dovecot-core - suggest ufw.
  + d/dovecot-core.dirs: Added usr/share/doc/dovecot-core
  + Add apport hook:
    - d/rules, d/source_dovecot.py
  + Add upstart job:
    - d/rules, d/dovecot-core.dovecot.upstart, d/control,
      d/dovecot-core.dirs, dovecot-imapd.{postrm, postinst, prerm},
      d/dovecot-pop3d.{postinst, postrm, prerm}.
      d/mail-stack-deliver.postinst: Convert init script to upstart.
  + Use the autotools-dev dh addon to update config.guess/config.sub for
    arm64.
* Dropped changes, included in Debian:
  - Update Dovecot name to reflect distribution in login greeting.
  - Update Drac plugin for >= 2.0.0 support.
* d/control: Drop dovecot-postfix package as its no longer required.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
require "vnd.dovecot.testsuite";
2
2
 
3
 
/* 
4
 
 * ## RFC 5228, Section 5.3. Test anyof (page 27) ## 
 
3
/*
 
4
 * ## RFC 5228, Section 5.3. Test anyof (page 27) ##
5
5
 */
6
6
 
7
7
/* "The "anyof" test performs a logical OR on the tests supplied to it.
8
 
 * 
 
8
 *
9
9
 *  Example:  anyof (false, false)  =>   false
10
10
 *            anyof (false, true)   =>   true
11
11
 *            anyof (true,  true)   =>   true
56
56
        } else {
57
57
                test_fail "chose wrong first-true outcome: false";
58
58
        }
59
 
        
 
59
 
60
60
        if anyof ( false, true, false ) {
61
61
                /* Correct */
62
62
        } else {
63
63
                test_fail "chose wrong second-true outcome: false";
64
64
        }
65
65
 
66
 
        if anyof ( false, false, true ) {               
 
66
        if anyof ( false, false, true ) {
67
67
                /* Correct */
68
68
        } else {
69
69
                test_fail "chose wrong last-true outcome: false";
74
74
        } else {
75
75
                test_fail "chose wrong first-false outcome: false";
76
76
        }
77
 
        
 
77
 
78
78
        if anyof ( true, false, true ) {
79
79
                /* Correct */
80
80
        } else {
118
118
        }
119
119
 
120
120
        if anyof ( exists "to", exists "frop", exists "frml" ) {
121
 
                /* Correct */           
 
121
                /* Correct */
122
122
        } else {
123
123
                test_fail "chose wrong first-true outcome: false";
124
124
        }
125
 
        
 
125
 
126
126
        if anyof ( exists "friep", exists "from", exists "frml" ) {
127
127
                /* Correct */
128
128
        } else {
140
140
        } else {
141
141
                test_fail "chose wrong first-false outcome: false";
142
142
        }
143
 
        
 
143
 
144
144
        if anyof ( exists "to", exists "frop", exists "cc" ) {
145
145
                /* Correct */
146
146
        } else {
202
202
        /* First true */
203
203
 
204
204
        if anyof ( true, exists "frop", exists "frml" ) {
205
 
                /* Correct */           
 
205
                /* Correct */
206
206
        } else {
207
207
                test_fail "chose wrong first-true first-static outcome: false";
208
208
        }
209
209
 
210
210
        if anyof ( exists "to", false, exists "frml" ) {
211
 
                /* Correct */           
 
211
                /* Correct */
212
212
        } else {
213
213
                test_fail "chose wrong first-true second-static outcome: false";
214
214
        }
215
215
 
216
216
        if anyof ( exists "to", exists "frop", false ) {
217
 
                /* Correct */           
 
217
                /* Correct */
218
218
        } else {
219
219
                test_fail "chose wrong first-true third-static outcome: false";
220
220
        }
221
221
 
222
222
        /* Second true */
223
 
        
 
223
 
224
224
        if anyof ( false, exists "from", exists "frml" ) {
225
225
                /* Correct */
226
226
        } else {
280
280
        }
281
281
 
282
282
        /* Second false */
283
 
        
 
283
 
284
284
        if anyof ( true, exists "frop", exists "cc" ) {
285
285
                /* Correct */
286
286
        } else {