1 (defun notmuch-test-address-cleaning-1 ()
2 (notmuch-test-expect-equal (notmuch-show-clean-address "dme@dme.org")
5 (defun notmuch-test-address-cleaning-2 ()
6 (let* ((input '("foo@bar.com"
8 "Foo Bar <foo@bar.com>"
9 "foo@bar.com <foo@bar.com>"
10 "\"Foo Bar\" <foo@bar.com>"))
11 (expected '("foo@bar.com"
13 "Foo Bar <foo@bar.com>"
15 "Foo Bar <foo@bar.com>"))
16 (output (mapcar #'notmuch-show-clean-address input)))
17 (notmuch-test-expect-equal output expected)))
19 (defun notmuch-test-address-cleaning-3 ()
20 (let* ((input '("ДБ <db-uknot@stop.me.uk>"
21 "foo (at home) <foo@bar.com>"
22 "foo [at home] <foo@bar.com>"
24 "'Foo Bar' <foo@bar.com>"
25 "\"'Foo Bar'\" <foo@bar.com>"
26 "'\"Foo Bar\"' <foo@bar.com>"
27 "'\"'Foo Bar'\"' <foo@bar.com>"
28 "Fred Dibna \\[extraordinaire\\] <fred@dibna.com>"))
29 (expected '("ДБ <db-uknot@stop.me.uk>"
30 "foo (at home) <foo@bar.com>"
31 "foo [at home] <foo@bar.com>"
33 "Foo Bar <foo@bar.com>"
34 "Foo Bar <foo@bar.com>"
35 "Foo Bar <foo@bar.com>"
36 "Foo Bar <foo@bar.com>"
37 "Fred Dibna [extraordinaire] <fred@dibna.com>"))
38 (output (mapcar #'notmuch-show-clean-address input)))
39 (notmuch-test-expect-equal output expected)))