unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* [PATCH 1/3] test: Add tests for `notmuch-show-clean-address'.
@ 2011-12-27 10:15 David Edmondson
  2011-12-27 10:15 ` [PATCH 2/3] emacs: Avoid `mail-header-parse-address' in `notmuch-show-clean-address' David Edmondson
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: David Edmondson @ 2011-12-27 10:15 UTC (permalink / raw)
  To: notmuch

---

The address containing UTF-8 still fails. This looks like a failure to
properly round-trip UTF-8 in the test suite - the test passes if run
directly within emacs.

 test/emacs                                         |   19 +++++++++++++++++++
 .../notmuch-address-simplification                 |    9 +++++++++
 2 files changed, 28 insertions(+), 0 deletions(-)
 create mode 100644 test/emacs.expected-output/notmuch-address-simplification

diff --git a/test/emacs b/test/emacs
index ca82445..bb4a75f 100755
--- a/test/emacs
+++ b/test/emacs
@@ -514,4 +514,23 @@ counter=$(test_emacs \
 )
 test_expect_equal "$counter" 2
 
+test_begin_subtest "notmuch-show address simplification"
+test_emacs '
+(with-temp-buffer
+  (let ((input (list
+"foo@bar.com"
+"<foo@bar.com>"
+"Foo Bar <foo@bar.com>"
+"foo@bar.com <foo@bar.com>"
+"ДБ <db-uknot@stop.me.uk>"
+"foo (at home) <foo@bar.com>"
+"foo [at home] <foo@bar.com>"
+"\"Foo Bar\" <foo@bar.com>"
+"Foo Bar"
+		)))
+    (mapc (lambda (a) (insert (notmuch-show-clean-address a) "\n")) input))
+  (test-output))
+'
+test_expect_equal_file OUTPUT $EXPECTED/notmuch-address-simplification
+
 test_done
diff --git a/test/emacs.expected-output/notmuch-address-simplification b/test/emacs.expected-output/notmuch-address-simplification
new file mode 100644
index 0000000..0afe190
--- /dev/null
+++ b/test/emacs.expected-output/notmuch-address-simplification
@@ -0,0 +1,9 @@
+foo@bar.com
+foo@bar.com
+Foo Bar <foo@bar.com>
+foo@bar.com
+ДБ <db-uknot@stop.me.uk>
+foo (at home) <foo@bar.com>
+foo [at home] <foo@bar.com>
+Foo Bar <foo@bar.com>
+Foo Bar
-- 
1.7.7.3

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2012-01-10 11:17 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-27 10:15 [PATCH 1/3] test: Add tests for `notmuch-show-clean-address' David Edmondson
2011-12-27 10:15 ` [PATCH 2/3] emacs: Avoid `mail-header-parse-address' in `notmuch-show-clean-address' David Edmondson
2011-12-27 10:15 ` [PATCH 3/3] test: Correct the expected output of the 'invalid From' test David Edmondson
2011-12-28 21:16   ` Tomi Ollila
2011-12-30  9:39 ` [PATCH 1/3 v2] emacs: Avoid `mail-header-parse-address' in `notmuch-show-clean-address' David Edmondson
2011-12-30  9:39   ` [PATCH 2/3 v2] test: Add tests for `notmuch-show-clean-address' David Edmondson
2012-01-10 11:06     ` David Bremner
2012-01-10 11:17       ` David Edmondson
2011-12-30  9:39   ` [PATCH 3/3 v2] test: Fix the 'invalid from' test in light of address cleaning changes David Edmondson

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).