]> git.cworth.org Git - notmuch-old/blob - test/emacs-address-cleaning.el
tests: remove dead code from T055-path-config.sh
[notmuch-old] / test / emacs-address-cleaning.el
1 (defun notmuch-test-address-cleaning-1 ()
2   (notmuch-test-expect-equal (notmuch-show-clean-address "dme@dme.org")
3                              "dme@dme.org"))
4
5 (defun notmuch-test-address-cleaning-2 ()
6   (let* ((input '("foo@bar.com"
7                   "<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"
12                      "foo@bar.com"
13                      "Foo Bar <foo@bar.com>"
14                      "foo@bar.com"
15                      "Foo Bar <foo@bar.com>"))
16          (output (mapcar #'notmuch-show-clean-address input)))
17     (notmuch-test-expect-equal output expected)))
18
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>"
23                   "Foo Bar"
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>"
32                      "Foo Bar"
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)))