4 (luna-define-class test-wl-draft
(lunit-test-case))
6 (luna-define-method test-wl-draft-deduce-address-list-1
((case test-wl-draft
))
9 '("foo@example.com" "bar@example.com")
11 (insert "To: foo@example.com, bar@example.com
13 (wl-draft-deduce-address-list (current-buffer) (point-min) (point-max))))))
15 (luna-define-method test-wl-draft-deduce-address-list-2
((case test-wl-draft
))
18 '("foo@example.com" "bar@example.com")
20 (insert "To: foo@example.com
23 (wl-draft-deduce-address-list (current-buffer) (point-min) (point-max))))))
25 ;; RFC 2822 A.1.2. Different types of mailboxes
26 (luna-define-method test-wl-draft-deduce-address-list-rfc2822-example-1
((case test-wl-draft
))
29 '("mary@x.test" "jdoe@example.org" "one@y.test" "boss@nil.test" "sysservices@example.net")
31 (insert "From: \"Joe Q. Public\" <john.q.public@example.com>
32 To: Mary Smith <mary@x.test>, jdoe@example.org, Who? <one@y.test>
33 Cc: <boss@nil.test>, \"Giant; \\\"Big\\\" Box\" <sysservices@example.net>
34 Date: Tue, 1 Jul 2003 10:52:37 +0200
35 Message-ID: <5678.21-Nov-1997@example.com>
37 (wl-draft-deduce-address-list (current-buffer) (point-min) (point-max))))))
39 ;; RFC 2822 A.1.3. Group addresses
40 (luna-define-method test-wl-draft-deduce-address-list-rfc2822-example-2
((case test-wl-draft
))
43 '("c@a.test" "joe@where.test" "jdoe@one.test")
45 (insert "From: Pete <pete@silly.example>
46 To: A Group:Chris Jones <c@a.test>,joe@where.test,John <jdoe@one.test>;
47 Cc: Undisclosed recipients:;
48 Date: Thu, 13 Feb 1969 23:32:54 -0330
49 Message-ID: <testabcd.1234@silly.example>
51 (wl-draft-deduce-address-list (current-buffer) (point-min) (point-max))))))
53 ;; RFC 2822 A.3. Resent messages
54 (luna-define-method test-wl-draft-deduce-address-list-rfc2822-example-3
((case test-wl-draft
))
57 '("j-brown@other.example")
59 (insert "Resent-From: Mary Smith <mary@example.net>
60 Resent-To: Jane Brown <j-brown@other.example>
61 Resent-Date: Mon, 24 Nov 1997 14:22:01 -0800
62 Resent-Message-ID: <78910@example.net>
63 From: John Doe <jdoe@machine.example>
64 To: Mary Smith <mary@example.net>
66 Date: Fri, 21 Nov 1997 09:55:06 -0600
67 Message-ID: <1234@local.machine.example>
69 (wl-draft-deduce-address-list (current-buffer) (point-min) (point-max))))))
72 (luna-define-method test-wl-draft-deduce-address-list-rfc2822-obs-1
((case test-wl-draft
))
77 (insert "To: foo.bar <foo@example.com>
79 (wl-draft-deduce-address-list (current-buffer) (point-min) (point-max))))))
81 ;; multiple occurrences of destination address fields
82 (luna-define-method test-wl-draft-deduce-address-list-rfc2822-obs-2
((case test-wl-draft
))
85 '("foo@example.com" "bar@example.com")
87 (insert "To: foo@example.com
90 (wl-draft-deduce-address-list (current-buffer) (point-min) (point-max))))))