~ubuntu-branches/ubuntu/quantal/dovecot/quantal

« back to all changes in this revision

Viewing changes to sieve/tests/match-types/contains.svtest

  • Committer: Bazaar Package Importer
  • Author(s): Chuck Short, Scott Kitterman
  • Date: 2010-06-22 10:33:51 UTC
  • mfrom: (1.13.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20100622103351-ifbmnklp8kxrhb30
Tags: 1:1.2.12-0ubuntu1
* New upstream release:
  - deliver: Don't crash when a message with Auto-submitted: header gets
   rejected.
  - lib-storage: Fixed header searches to work correctly when there are
    multiple headers with same name.
  - dict client: Disconnect from dict server after 1 second of idling.
  - dict: If process crashed, it wasn't automatically restarted
  - dict file: If dict file's group permissions equal world permissions,
    don't try to change its gid.
  - maildir: Fixed a memory leak when copying with hardlinks.
  - maildir: Expunging last messages may have assert-crashed if their
    filenames had just changed.
 * Update sieve patch to 0.1.17
 * debian/dovecot-common.postinst: Add warning about expired certificate.
   (Debian Bug: #576455)
 * Silence lintian warnings.

 [Scott Kitterman]
 * Rename dovecot-postfix to mail-stack-delivery per server-maverick-mail-
   integration spec.
   - Update debian/rules
   - Convert existing package to a dummy package and add new binary in debian/control
   - Update maintainer scripts.
   - Move previously installed backups and config files to new package name
     space in preinst
   - Add new debian/mail-stack-delivery.prerm to handle downgrades
   - Rename debian/dovecot-postfix.* to debian/mail-stack-delivery.*

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
require "vnd.dovecot.testsuite";
2
2
 
3
3
test_set "message" text:
4
 
From: stephan@rename-it.nl
 
4
From: stephan@example.org
5
5
Cc: frop@example.com
6
 
To: test@dovecot.org
 
6
To: test@dovecot.example.net
7
7
X-Bullshit: f fr fro frop frob frobn frobnitzn
8
8
Subject: Test Message
9
 
Comment:
 
9
Comment:                                 
10
10
 
11
11
Test!
12
12
.
25
25
}
26
26
 
27
27
test "Match full" {
28
 
        if not address :contains "from" "stephan@rename-it.nl" {
 
28
        if not address :contains "from" "stephan@example.org" {
29
29
                test_fail "should have matched";
30
30
        }
31
31
}
37
37
}
38
38
 
39
39
test "Match end" {
40
 
        if not address :contains "from" "rename-it.nl" {
 
40
        if not address :contains "from" "example.org" {
41
41
                test_fail "should have matched";
42
42
        }
43
43
}
55
55
}
56
56
 
57
57
test "Match case-insensitive" {
58
 
        if not address :contains :comparator "i;ascii-casemap" "from" "RENAME-IT" {
59
 
                test_fail "match fails to apply correct comparator";
 
58
        if not address :contains :comparator "i;ascii-casemap" "from" "EXAMPLE" {
 
59
                test_fail "match fails to apply correct comparator";    
60
60
        }
61
61
 
62
 
        if not address :contains "from" "RENAME-IT" {
63
 
        test_fail "default comparator is wrong";
64
 
    }
 
62
        if not address :contains "from" "EXAMPLE" {
 
63
                test_fail "default comparator is wrong";
 
64
        }
65
65
}
66
66
 
67
67
# Non-match tests