[PATCH 1/3] test: add known broken test exit code of notmuch show
authorDavid Bremner <david@tethera.net>
Thu, 23 Jan 2014 12:23:59 +0000 (08:23 +2000)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:59:13 +0000 (09:59 -0800)
04/94b3defeff6188ff5a8d6a2473fd0c34503f98 [new file with mode: 0644]

diff --git a/04/94b3defeff6188ff5a8d6a2473fd0c34503f98 b/04/94b3defeff6188ff5a8d6a2473fd0c34503f98
new file mode 100644 (file)
index 0000000..4bfada0
--- /dev/null
@@ -0,0 +1,79 @@
+Return-Path: <bremner@tethera.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 C4CB8431FAF\r
+       for <notmuch@notmuchmail.org>; Thu, 23 Jan 2014 04:24:26 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 0\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]\r
+       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 WV78JAHUS8ZZ for <notmuch@notmuchmail.org>;\r
+       Thu, 23 Jan 2014 04:24:21 -0800 (PST)\r
+Received: from yantan.tethera.net (yantan.tethera.net [199.188.72.155])\r
+       (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits))\r
+       (No client certificate requested)\r
+       by olra.theworths.org (Postfix) with ESMTPS id 33787431FBF\r
+       for <notmuch@notmuchmail.org>; Thu, 23 Jan 2014 04:24:18 -0800 (PST)\r
+Received: from remotemail by yantan.tethera.net with local (Exim 4.80)\r
+       (envelope-from <bremner@tethera.net>)\r
+       id 1W6JKT-0006Wu-Sw; Thu, 23 Jan 2014 08:24:17 -0400\r
+Received: (nullmailer pid 17150 invoked by uid 1000); Thu, 23 Jan 2014\r
+       12:24:06 -0000\r
+From: David Bremner <david@tethera.net>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH 1/3] test: add known broken test exit code of notmuch show\r
+Date: Thu, 23 Jan 2014 08:23:59 -0400\r
+Message-Id: <1390479841-17045-2-git-send-email-david@tethera.net>\r
+X-Mailer: git-send-email 1.8.5.2\r
+In-Reply-To: <1390479841-17045-1-git-send-email-david@tethera.net>\r
+References: <m2r47zrkkc.fsf@guru.guru-group.fi>\r
+       <1390479841-17045-1-git-send-email-david@tethera.net>\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: Thu, 23 Jan 2014 12:24:27 -0000\r
+\r
+This test catches a segfault on a syntactically invalid query. It also\r
+catches a problem with my initial fix, which still returned 0.\r
+---\r
+ test/T520-show.sh | 14 ++++++++++++++\r
+ 1 file changed, 14 insertions(+)\r
+ create mode 100755 test/T520-show.sh\r
+\r
+diff --git a/test/T520-show.sh b/test/T520-show.sh\r
+new file mode 100755\r
+index 0000000..bdd9d71\r
+--- /dev/null\r
++++ b/test/T520-show.sh\r
+@@ -0,0 +1,14 @@\r
++#!/usr/bin/env bash\r
++test_description='"notmuch show"'\r
++\r
++. ./test-lib.sh\r
++\r
++add_email_corpus\r
++\r
++test_begin_subtest "exit code for show invalid query"\r
++test_subtest_known_broken\r
++notmuch show foo..\r
++exit_code=$?\r
++test_expect_equal 1 $exit_code\r
++\r
++test_done\r
+-- \r
+1.8.5.2\r
+\r