Re: [PATCH] test: use (format "%S") to print nil in emacs test.
authorAustin Clements <amdragon@MIT.EDU>
Fri, 31 Aug 2012 03:52:27 +0000 (23:52 +2000)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:49:14 +0000 (09:49 -0800)
dd/d407bd45686e0f9999c5c8071d9d106592c7e9 [new file with mode: 0644]

diff --git a/dd/d407bd45686e0f9999c5c8071d9d106592c7e9 b/dd/d407bd45686e0f9999c5c8071d9d106592c7e9
new file mode 100644 (file)
index 0000000..0ae2103
--- /dev/null
@@ -0,0 +1,118 @@
+Return-Path: <amdragon@mit.edu>\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 75270431FAF\r
+       for <notmuch@notmuchmail.org>; Thu, 30 Aug 2012 20:52:32 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.7\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5\r
+       tests=[RCVD_IN_DNSWL_LOW=-0.7] 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 0YGkm2tfrE6p for <notmuch@notmuchmail.org>;\r
+       Thu, 30 Aug 2012 20:52:30 -0700 (PDT)\r
+Received: from dmz-mailsec-scanner-8.mit.edu (DMZ-MAILSEC-SCANNER-8.MIT.EDU\r
+       [18.7.68.37])\r
+       by olra.theworths.org (Postfix) with ESMTP id 973D2431FAE\r
+       for <notmuch@notmuchmail.org>; Thu, 30 Aug 2012 20:52:30 -0700 (PDT)\r
+X-AuditID: 12074425-b7f9b6d0000008c4-1e-504034fe0d2d\r
+Received: from mailhub-auth-2.mit.edu ( [18.7.62.36])\r
+       by dmz-mailsec-scanner-8.mit.edu (Symantec Messaging Gateway) with SMTP\r
+       id 6C.34.02244.EF430405; Thu, 30 Aug 2012 23:52:30 -0400 (EDT)\r
+Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103])\r
+       by mailhub-auth-2.mit.edu (8.13.8/8.9.2) with ESMTP id q7V3qTlM019929; \r
+       Thu, 30 Aug 2012 23:52:29 -0400\r
+Received: from awakening.csail.mit.edu (awakening.csail.mit.edu [18.26.4.91])\r
+       (authenticated bits=0)\r
+       (User authenticated as amdragon@ATHENA.MIT.EDU)\r
+       by outgoing.mit.edu (8.13.6/8.12.4) with ESMTP id q7V3qRqr002909\r
+       (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT);\r
+       Thu, 30 Aug 2012 23:52:28 -0400 (EDT)\r
+Received: from amthrax by awakening.csail.mit.edu with local (Exim 4.77)\r
+       (envelope-from <amdragon@mit.edu>)\r
+       id 1T7IHT-00086O-FR; Thu, 30 Aug 2012 23:52:27 -0400\r
+Date: Thu, 30 Aug 2012 23:52:27 -0400\r
+From: Austin Clements <amdragon@MIT.EDU>\r
+To: david@tethera.net\r
+Subject: Re: [PATCH] test: use (format "%S") to print nil in emacs test.\r
+Message-ID: <20120831035227.GH11179@mit.edu>\r
+References: <1346375399-449-1-git-send-email-david@tethera.net>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain; charset=us-ascii\r
+Content-Disposition: inline\r
+In-Reply-To: <1346375399-449-1-git-send-email-david@tethera.net>\r
+User-Agent: Mutt/1.5.21 (2010-09-15)\r
+X-Brightmail-Tracker:\r
+ H4sIAAAAAAAAA+NgFprBKsWRmVeSWpSXmKPExsUixG6novvPxCHAYEsHt8XGZT+ZLW60djNa\r
+       XL85k9mB2eNX21xmj2erbjF7bDn0njmAOYrLJiU1J7MstUjfLoEr4+LeH8wFC3grZv++xdLA\r
+       +J2ri5GDQ0LARGLH8vouRk4gU0ziwr31bF2MXBxCAvsYJdb+/wPlbGCU+PZ5JQtIlZDASSaJ\r
+       LVuLIRJLGCX+37nJDpJgEVCV6DvaB1bEJqAhsW3/ckYQW0RAVOL0pkmsIDazgL3EotmTwOqF\r
+       BTwkOq+fB4vzCuhINHfNYIJYYC9x9sFlNoi4oMTJmU9YIHq1JG78e8kEcjWzgLTE8n8cIGFO\r
+       AQeJ7bMg1ooKqEhMObmNbQKj0Cwk3bOQdM9C6F7AyLyKUTYlt0o3NzEzpzg1Wbc4OTEvL7VI\r
+       10IvN7NELzWldBMjONBdVHcwTjikdIhRgINRiYe3co19gBBrYllxZe4hRkkOJiVRXm9jhwAh\r
+       vqT8lMqMxOKM+KLSnNTiQ4wSHMxKIryzPgOV86YkVlalFuXDpKQ5WJTEeW+k3PQXEkhPLEnN\r
+       Tk0tSC2CycpwcChJ8JoAI1pIsCg1PbUiLTOnBCHNxMEJMpwHaPhxkMW8xQWJucWZ6RD5U4y6\r
+       HP9PnrzLKMSSl5+XKiXOKw0ySACkKKM0D24OLEG9YhQHekuY9yHIKB5gcoOb9ApoCRPQEjkN\r
+       kA+KSxIRUlINjBlrd/G56Taw6z3Rnl0ZzWXsJMlsHpTrn2kafEWgSmd9+BJz0/t7Dt7Le2rP\r
+       vn7XlL9XuipMri2Ve59eMu37m4Y3ylHfDLdmTjojuuxSkp/N3zVVMcW6hUq3PYz5d9+RuMaQ\r
+       KJd+79HyqcYTPuQo5a6oub79QtQv7gu3C9bGfvhXqHhONNVDR4mlOCPRUIu5qDgRAEjT9vcr        AwAA\r
+Cc: notmuch@notmuchmail.org, David Bremner <bremner@debian.org>\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: Fri, 31 Aug 2012 03:52:32 -0000\r
+\r
+LGTM.  Alternatively, the test could be\r
+  (null (notmuch-wash....))\r
+with the correct answer being 't'.  That would avoid the awkward\r
+detour through a string, but either way is good as long as this test\r
+passes.\r
+\r
+Quoth david@tethera.net on Aug 30 at 10:09 pm:\r
+> From: David Bremner <bremner@debian.org>\r
+> \r
+> The behaviour of "emacsclient --eval nil" changed from emacs23 to\r
+> emacs24, and in emacs24 it prints 'nil' rather than an empty string.\r
+> \r
+> (format "%S" foo) produces a sexpr form of foo, and is consistent\r
+> between the two versions.\r
+> ---\r
+> \r
+> This fixes another test failure on emacs24. \r
+> \r
+> I guess maybe all test_emacs output could be canonicalized this way,\r
+> but I suspect that would be pretty disruptive.\r
+> \r
+>  test/emacs-subject-to-filename |    6 +++---\r
+>  1 file changed, 3 insertions(+), 3 deletions(-)\r
+> \r
+> diff --git a/test/emacs-subject-to-filename b/test/emacs-subject-to-filename\r
+> index 176e685..a0ffdfe 100755\r
+> --- a/test/emacs-subject-to-filename\r
+> +++ b/test/emacs-subject-to-filename\r
+> @@ -8,10 +8,10 @@ test_emacs '(ignore)'\r
+>  \r
+>  # test notmuch-wash-subject-to-patch-sequence-number (subject)\r
+>  test_begin_subtest "no patch sequence number"\r
+> -output=$(test_emacs '(notmuch-wash-subject-to-patch-sequence-number\r
+> -      "[PATCH] A normal patch subject without numbers")'\r
+> +output=$(test_emacs '(format "%S" (notmuch-wash-subject-to-patch-sequence-number\r
+> +      "[PATCH] A normal patch subject without numbers"))'\r
+>  )\r
+> -test_expect_equal "$output" ""\r
+> +test_expect_equal "$output" '"nil"'\r
+>  \r
+>  test_begin_subtest "patch sequence number #1"\r
+>  output=$(test_emacs '(notmuch-wash-subject-to-patch-sequence-number\r