File: message.svtest

package info (click to toggle)
dovecot 1%3A1.2.15-7
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 30,252 kB
  • ctags: 19,837
  • sloc: ansic: 191,438; sh: 21,091; makefile: 3,330; cpp: 526; perl: 108; xml: 44
file content (48 lines) | stat: -rw-r--r-- 1,250 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
require "vnd.dovecot.testsuite";
require "vacation";

test_set "message" text:
From: stephan@example.org
Subject: frop
References: <1234@local.machine.example> <3456@example.net>
 <435444@ttms.example.org> <4223@froop.example.net> <m345444444@message-id.exp>
Message-ID: <432df324@example.org>
To: nico@frop.example.org

Frop
.
;

test "References" {
	vacation "I am not in today!";

	if not test_result_execute {
		test_fail "execution of result failed";
	}

	test_message :smtp 0;

	if not header :contains "references" "432df324@example.org" {
		test_fail "references header does not contain new id";
	}

	if anyof (
		not header :contains "references" "1234@local.machine.example",
		not header :contains "references" "3456@example.net",
		not header :contains "references" "435444@ttms.example.org",
		not header :contains "references" "4223@froop.example.net",
		not header :contains "references" "m345444444@message-id.exp"
		) {
		test_fail "references header does not contain all existing ids";
	}

	if header :contains "references" "hutsefluts" {
		test_fail "references header contains nonsense";
	}
}

test "In-Reply-To" {
	if not header :is "in-reply-to" "<432df324@example.org>" {
		test_fail "in-reply-to header set incorrectly";
	}
}