unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
blob 83d6263575ef5fa388504351c82a20066229d561 1072 bytes (raw)
name: test/address-cleaning.el 	 # note: path name is non-authoritative(*)

 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
 
(defun notmuch-test-address-cleaning-1 ()
  (notmuch-test-compare (notmuch-show-clean-address "dme@dme.org")
			"dme@dme.org"))

(defun notmuch-test-address-cleaning-2 ()
  (let* ((input '("foo@bar.com"
		  "<foo@bar.com>"
		  "Foo Bar <foo@bar.com>"
		  "foo@bar.com <foo@bar.com>"
		  "\"Foo Bar\" <foo@bar.com>"))
	 (expected '("foo@bar.com"
		     "foo@bar.com"
		     "Foo Bar <foo@bar.com>"
		     "foo@bar.com"
		     "Foo Bar <foo@bar.com>"))
	 (output (mapcar #'notmuch-show-clean-address input)))
    (notmuch-test-compare output expected)))

(defun notmuch-test-address-cleaning-3 ()
  (let* ((input '("ДБ <db-uknot@stop.me.uk>"
		  "foo (at home) <foo@bar.com>"
		  "foo [at home] <foo@bar.com>"
		  "Foo Bar"
		  "Fred Dibna \\[extraordinaire\\] <fred@dibna.com>"))
	 (expected '("ДБ <db-uknot@stop.me.uk>"
		     "foo (at home) <foo@bar.com>"
		     "foo [at home] <foo@bar.com>"
		     "Foo Bar"
		     "Fred Dibna [extraordinaire] <fred@dibna.com>"))
	 (output (mapcar #'notmuch-show-clean-address input)))
    (notmuch-test-compare output expected)))

debug log:

solving 83d6263 ...
found 83d6263 in https://yhetil.org/notmuch/1326804748-8989-5-git-send-email-dme@dme.org/
found 59e8d92 in https://yhetil.org/notmuch/1326804748-8989-3-git-send-email-dme@dme.org/

applying [1/2] https://yhetil.org/notmuch/1326804748-8989-3-git-send-email-dme@dme.org/
diff --git a/test/address-cleaning.el b/test/address-cleaning.el
new file mode 100644
index 0000000..59e8d92


applying [2/2] https://yhetil.org/notmuch/1326804748-8989-5-git-send-email-dme@dme.org/
diff --git a/test/address-cleaning.el b/test/address-cleaning.el
index 59e8d92..83d6263 100644

Checking patch test/address-cleaning.el...
Applied patch test/address-cleaning.el cleanly.
Checking patch test/address-cleaning.el...
Applied patch test/address-cleaning.el cleanly.

index at:
100644 83d6263575ef5fa388504351c82a20066229d561	test/address-cleaning.el

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).