[PATCH 1/2] test: emacs mailto: URI handling
authorJameson Graef Rollins <jrollins@finestructure.net>
Sun, 29 Jan 2012 19:33:43 +0000 (11:33 +1600)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:43:31 +0000 (09:43 -0800)
af/f177bdd18f7e37d981497778a909ac21b4b352 [new file with mode: 0644]

diff --git a/af/f177bdd18f7e37d981497778a909ac21b4b352 b/af/f177bdd18f7e37d981497778a909ac21b4b352
new file mode 100644 (file)
index 0000000..bd8f974
--- /dev/null
@@ -0,0 +1,104 @@
+Return-Path: <jrollins@finestructure.net>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id BFB26429E3B\r
+       for <notmuch@notmuchmail.org>; Sun, 29 Jan 2012 11:33:50 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -2.3\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-2.3 tagged_above=-999 required=5\r
+       tests=[RCVD_IN_DNSWL_MED=-2.3] autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+       with ESMTP id Q97PSVjbZAxv for <notmuch@notmuchmail.org>;\r
+       Sun, 29 Jan 2012 11:33:48 -0800 (PST)\r
+Received: from outgoing-mail.its.caltech.edu (outgoing-mail.its.caltech.edu\r
+       [131.215.239.19])\r
+       by olra.theworths.org (Postfix) with ESMTP id C0A43429E34\r
+       for <notmuch@notmuchmail.org>; Sun, 29 Jan 2012 11:33:48 -0800 (PST)\r
+Received: from fire-doxen.imss.caltech.edu (localhost [127.0.0.1])\r
+       by fire-doxen-postvirus (Postfix) with ESMTP id 41C4B2E50E98\r
+       for <notmuch@notmuchmail.org>; Sun, 29 Jan 2012 11:33:48 -0800 (PST)\r
+X-Spam-Scanned: at Caltech-IMSS on fire-doxen by amavisd-new\r
+Received: from finestructure.net (cpe-76-174-137-84.socal.res.rr.com\r
+       [76.174.137.84]) (Authenticated sender: jrollins)\r
+       by fire-doxen-submit (Postfix) with ESMTP id DFD682E50E96\r
+       for <notmuch@notmuchmail.org>; Sun, 29 Jan 2012 11:33:44 -0800 (PST)\r
+Received: by finestructure.net (Postfix, from userid 1000)\r
+       id 3C03E550; Sun, 29 Jan 2012 11:33:44 -0800 (PST)\r
+From: Jameson Graef Rollins <jrollins@finestructure.net>\r
+To: Notmuch Mail <notmuch@notmuchmail.org>\r
+Subject: [PATCH 1/2] test: emacs mailto: URI handling\r
+Date: Sun, 29 Jan 2012 11:33:43 -0800\r
+Message-Id: <1327865624-7673-1-git-send-email-jrollins@finestructure.net>\r
+X-Mailer: git-send-email 1.7.8.3\r
+MIME-Version: 1.0\r
+Content-Type: text/plain; charset=UTF-8\r
+Content-Transfer-Encoding: 8bit\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+       <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Sun, 29 Jan 2012 19:33:50 -0000\r
+\r
+This adds a test for proposed rfc6068 "mailto:" URI handling.  The\r
+proposed function would be called 'notmuch-mua-mailto'.  The test\r
+provides an example mailto: string that should test some subset of the\r
+rfc6068 specification: http://tools.ietf.org/html/rfc6068\r
+---\r
+ test/emacs |   29 +++++++++++++++++++++++++++++\r
+ 1 files changed, 29 insertions(+), 0 deletions(-)\r
+\r
+diff --git a/test/emacs b/test/emacs\r
+index 8ca4c8a..c6afa14 100755\r
+--- a/test/emacs\r
++++ b/test/emacs\r
+@@ -273,6 +273,35 @@ On 01 Jan 2000 12:00:00 -0000, Notmuch Test Suite <test_suite@notmuchmail.org> w\r
+ EOF\r
+ test_expect_equal_file OUTPUT EXPECTED\r
\r
++test_begin_subtest "Compose to \"mailto:\" URI"\r
++test_subtest_known_broken\r
++# This *should* test the ability to parse rfc6068 "mailto:" URIs:\r
++# http://tools.ietf.org/html/rfc6068\r
++# this test is based on:\r
++# http://shadow2531.com/opera/testcases/mailto/rfc2368-0.html\r
++# which is itself based on the precursor rfc2368, so it could probably\r
++# be updated.\r
++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>\")\r
++                (notmuch-fcc-dirs nil))\r
++            (notmuch-mua-mailto mailto)\r
++            (test-output))"\r
++cat <<EOF >EXPECTED\r
++From: Notmuch Test Suite <test_suite@notmuchmail.org>\r
++To: to1@example.net, to2@example.net, to3@example.net, to4@example.net\r
++Cc: cc1@example.net, cc2@example.net\r
++Subject: last call for cats & dogs.\r
++In-Reply-To: <orig1@example.net>\r
++Bcc: bcc1@example.net, bcc2@example.net\r
++--text follows this line--\r
++line1\r
++line2\r
++line3\r
++line4\r
++Column1A      Column1B        Column1C        Column1D\r
++√\r
++EOF\r
++test_expect_equal_file OUTPUT EXPECTED\r
++\r
+ test_begin_subtest "Save attachment from within emacs using notmuch-show-save-attachments"\r
+ # save as archive to test that Emacs does not re-compress .gz\r
+ test_emacs '(let ((standard-input "\"attachment1.gz\""))\r
+-- \r
+1.7.8.3\r
+\r