From 181301332c81bbf91969db33834497202e15390b Mon Sep 17 00:00:00 2001 From: david Date: Fri, 31 Aug 2012 22:09:59 +2100 Subject: [PATCH] [PATCH] test: use (format "%S") to print nil in emacs test. --- 06/5024d7bbf1f82c71a6d4d66b8ed8ac3c3b1f1d | 90 +++++++++++++++++++++++ 1 file changed, 90 insertions(+) create mode 100644 06/5024d7bbf1f82c71a6d4d66b8ed8ac3c3b1f1d diff --git a/06/5024d7bbf1f82c71a6d4d66b8ed8ac3c3b1f1d b/06/5024d7bbf1f82c71a6d4d66b8ed8ac3c3b1f1d new file mode 100644 index 000000000..b89af04e5 --- /dev/null +++ b/06/5024d7bbf1f82c71a6d4d66b8ed8ac3c3b1f1d @@ -0,0 +1,90 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by olra.theworths.org (Postfix) with ESMTP id 51375431FAF + for ; Thu, 30 Aug 2012 18:10:24 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: 0 +X-Spam-Level: +X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none] + 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 QJ66mnuWV3nn for ; + Thu, 30 Aug 2012 18:10:23 -0700 (PDT) +Received: from tesseract.cs.unb.ca (tesseract.cs.unb.ca [131.202.240.238]) + (using TLSv1 with cipher AES256-SHA (256/256 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id DD9D0431FAE + for ; Thu, 30 Aug 2012 18:10:23 -0700 (PDT) +Received: from fctnnbsc30w-156034089108.dhcp-dynamic.fibreop.nb.bellaliant.net + ([156.34.89.108] helo=zancas.localnet) + by tesseract.cs.unb.ca with esmtpsa + (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) + (envelope-from ) + id 1T7Fkc-0004Hh-I4; Thu, 30 Aug 2012 22:10:22 -0300 +Received: from bremner by zancas.localnet with local (Exim 4.80) + (envelope-from ) + id 1T7FkX-000091-0x; Thu, 30 Aug 2012 22:10:17 -0300 +From: david@tethera.net +To: notmuch@notmuchmail.org +Subject: [PATCH] test: use (format "%S") to print nil in emacs test. +Date: Thu, 30 Aug 2012 22:09:59 -0300 +Message-Id: <1346375399-449-1-git-send-email-david@tethera.net> +X-Mailer: git-send-email 1.7.10.4 +X-Spam_bar: - +Cc: 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 01:10:24 -0000 + +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 +-- +1.7.10.4 + -- 2.26.2