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