unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* [PATCH 1/2] test: emacs mailto: URI handling
@ 2012-01-29 19:33 Jameson Graef Rollins
  2012-01-29 19:33 ` [PATCH 2/2] emacs: new mua mailto: URI handler Jameson Graef Rollins
  2012-10-15 17:12 ` [PATCH 1/2] test: emacs mailto: URI handling Ethan Glasser-Camp
  0 siblings, 2 replies; 14+ messages in thread
From: Jameson Graef Rollins @ 2012-01-29 19:33 UTC (permalink / raw)
  To: Notmuch Mail

This adds a test for proposed rfc6068 "mailto:" URI handling.  The
proposed function would be called 'notmuch-mua-mailto'.  The test
provides an example mailto: string that should test some subset of the
rfc6068 specification: http://tools.ietf.org/html/rfc6068
---
 test/emacs |   29 +++++++++++++++++++++++++++++
 1 files changed, 29 insertions(+), 0 deletions(-)

diff --git a/test/emacs b/test/emacs
index 8ca4c8a..c6afa14 100755
--- a/test/emacs
+++ b/test/emacs
@@ -273,6 +273,35 @@ On 01 Jan 2000 12:00:00 -0000, Notmuch Test Suite <test_suite@notmuchmail.org> w
 EOF
 test_expect_equal_file OUTPUT EXPECTED
 
+test_begin_subtest "Compose to \"mailto:\" URI"
+test_subtest_known_broken
+# This *should* test the ability to parse rfc6068 "mailto:" URIs:
+# http://tools.ietf.org/html/rfc6068
+# this test is based on:
+# http://shadow2531.com/opera/testcases/mailto/rfc2368-0.html
+# which is itself based on the precursor rfc2368, so it could probably
+# be updated.
+test_emacs "(let ((mailto \"mailto:to1%40example.net%2C%20to2%40example.net?to=to3%40example.net%2C%20to4%40example.net&amp;subject=last%20call%20for%20cats%20%26%20dogs%2E&amp;subject=You%20should%20not%20see%20me%2E&amp;body=line1%0D%0Aline2&amp;body=line3&amp;body=line4%0D%0AColumn1A%09Column1B%09Column1C%09Column1D%0D%0A%E2%88%9A&amp;cc=cc1%40example.net%2C%20cc2%40example.net&amp;to=to5%40example.net%2C%20to6%40example.net&amp;foo=IGNORE&amp;bcc=bcc1%40example.net%2C%20bcc2%40example.net&amp;bcc=bcc3%40example.net%2C%20bcc4%40example.net&amp;in-reply-to=<orig1@example.net>\")
+		  (notmuch-fcc-dirs nil))
+	      (notmuch-mua-mailto mailto)
+	      (test-output))"
+cat <<EOF >EXPECTED
+From: Notmuch Test Suite <test_suite@notmuchmail.org>
+To: to1@example.net, to2@example.net, to3@example.net, to4@example.net
+Cc: cc1@example.net, cc2@example.net
+Subject: last call for cats & dogs.
+In-Reply-To: <orig1@example.net>
+Bcc: bcc1@example.net, bcc2@example.net
+--text follows this line--
+line1
+line2
+line3
+line4
+Column1A	Column1B	Column1C	Column1D
+√
+EOF
+test_expect_equal_file OUTPUT EXPECTED
+
 test_begin_subtest "Save attachment from within emacs using notmuch-show-save-attachments"
 # save as archive to test that Emacs does not re-compress .gz
 test_emacs '(let ((standard-input "\"attachment1.gz\""))
-- 
1.7.8.3

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

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

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-29 19:33 [PATCH 1/2] test: emacs mailto: URI handling Jameson Graef Rollins
2012-01-29 19:33 ` [PATCH 2/2] emacs: new mua mailto: URI handler Jameson Graef Rollins
2012-01-30 15:43   ` David Edmondson
2012-01-30 17:36     ` Jameson Graef Rollins
2012-04-14 20:05   ` Jameson Graef Rollins
2012-04-14 20:26     ` Jani Nikula
2012-04-14 20:36       ` Jameson Graef Rollins
2012-04-14 21:22         ` Jani Nikula
2012-04-14 21:26           ` Jameson Graef Rollins
2012-04-14 21:56             ` Jani Nikula
2012-04-14 21:27   ` [PATCH v2 " Jameson Graef Rollins
2012-06-19  7:42     ` Mark Walters
2012-06-19 20:46       ` Jameson Graef Rollins
2012-10-15 17:12 ` [PATCH 1/2] test: emacs mailto: URI handling Ethan Glasser-Camp

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