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

« back to all changes in this revision

Viewing changes to pigeonhole/tests/extensions/body/content.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:
139
139
test "Empty Content Type" {
140
140
        if not body :content "" :matches "This is a text message.*" {
141
141
                test_fail "failed to match text/plain content";
142
 
        }       
 
142
        }
143
143
 
144
144
        if not body :content "" :matches "<html><body>This is HTML</body></html>*" {
145
145
                test_fail "failed to match text/html content";
147
147
 
148
148
        if not body :content "" :matches "keep;*" {
149
149
                test_fail "failed to match application/sieve content";
150
 
        }       
 
150
        }
151
151
 
152
152
        if body :content "" :matches "*blurdybloop*" {
153
153
                test_fail "body :content \"\" test matches nonsense";
154
 
        }       
 
154
        }
155
155
}
156
156
 
157
157
test "Main Content Type" {
158
158
        if not body :content "text" :matches "This is a text message.*" {
159
159
                test_fail "failed to match text/plain content";
160
 
        }       
 
160
        }
161
161
 
162
162
        if not body :content "text" :matches "<html><body>This is HTML</body></html>*" {
163
163
                test_fail "failed to match text/html content";
165
165
 
166
166
        if body :content "text" :matches "keep;*" {
167
167
                test_fail "erroneously matched application/sieve content";
168
 
        }       
 
168
        }
169
169
}
170
170
 
171
171
/*
190
190
Content-Type: text/plain; charset="us-ascii"
191
191
 
192
192
Hello
193
 
        
 
193
 
194
194
--inner
195
195
Content-Type: text/html; charset="us-ascii"
196
196
 
242
242
        }
243
243
 
244
244
        if not body :content "text" :contains "html" {
245
 
                test_fail "failed match text content (1)";      
 
245
                test_fail "failed match text content (1)";
246
246
        }
247
247
 
248
248
        if not body :content "text" :contains "hello" {
256
256
        if not body :content "text" :contains "please say hello" {
257
257
                test_fail "failed match nested message content as text/*";
258
258
        }
259
 
        
 
259
 
260
260
        if not body :content "text" :count "eq" :comparator "i;ascii-numeric" "3" {
261
261
                test_fail "matched wrong number of \"text/*\" body parts";
262
262
        }
282
282
                "This is a nested multi-part message in MIME format" {
283
283
                test_fail "missed second multipart body part";
284
284
        }
285
 
        
 
285
 
286
286
/* FIXME: FAILS
287
287
 
288
288
        if not body :content "multipart" :contains
293
293
        if not body :content "multipart" :contains
294
294
                "This is the end of the outer MIME multipart." {
295
295
                test_fail "missed fourth multipart body part";
296
 
        }       
 
296
        }
297
297
 
298
298
        if body :content "multipart" :contains "--inner" {
299
299
                test_fail "inner boundary is part of match";