[PATCH 1/2] New test: Emacs' forgetfulness.
authorThomas Schwinge <thomas@schwinge.name>
Wed, 2 Feb 2011 23:56:38 +0000 (00:56 +0100)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:37:51 +0000 (09:37 -0800)
a0/addd2b1ff02478af024401975bfa26fd075f63 [new file with mode: 0644]

diff --git a/a0/addd2b1ff02478af024401975bfa26fd075f63 b/a0/addd2b1ff02478af024401975bfa26fd075f63
new file mode 100644 (file)
index 0000000..7459383
--- /dev/null
@@ -0,0 +1,119 @@
+Return-Path: <thomas@schwinge.name>\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 7BE6A431FB6\r
+       for <notmuch@notmuchmail.org>; Wed,  2 Feb 2011 15:58:25 -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\r
+       tests=[RCVD_IN_DNSWL_NONE=-0.0001] 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 Is6vxZGLxOuT for <notmuch@notmuchmail.org>;\r
+       Wed,  2 Feb 2011 15:58:25 -0800 (PST)\r
+Received: from smtprelay03.ispgateway.de (smtprelay03.ispgateway.de\r
+       [80.67.31.26])\r
+       by olra.theworths.org (Postfix) with ESMTP id C333B431FB5\r
+       for <notmuch@notmuchmail.org>; Wed,  2 Feb 2011 15:58:24 -0800 (PST)\r
+Received: from [87.180.46.33] (helo=stokes.schwinge.homeip.net)\r
+       by smtprelay03.ispgateway.de with esmtpa (Exim 4.68)\r
+       (envelope-from <thomas@schwinge.name>) id 1PkmZl-0000PV-Vh\r
+       for notmuch@notmuchmail.org; Thu, 03 Feb 2011 00:57:30 +0100\r
+Received: (qmail 7026 invoked from network); 2 Feb 2011 23:57:10 -0000\r
+Received: from schwinge.homeip.net (87.180.46.33)\r
+       by stokes.schwinge.homeip.net with QMQP; 2 Feb 2011 23:57:10 -0000\r
+Received: (nullmailer pid 16859 invoked by uid 1000);\r
+       Wed, 02 Feb 2011 23:57:09 -0000\r
+From: Thomas Schwinge <thomas@schwinge.name>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH 1/2] New test: Emacs' forgetfulness.\r
+Date: Thu,  3 Feb 2011 00:56:38 +0100\r
+Message-Id: <1296690999-16542-2-git-send-email-thomas@schwinge.name>\r
+X-Mailer: git-send-email 1.7.1\r
+In-Reply-To: <87zkqeiffj.fsf@kepler.schwinge.homeip.net>\r
+References: <87zkqeiffj.fsf@kepler.schwinge.homeip.net>\r
+X-Df-Sender: thomas@schwinge.name\r
+Cc: Thomas Schwinge <thomas@schwinge.name>\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: Wed, 02 Feb 2011 23:58:25 -0000\r
+\r
+Signed-off-by: Thomas Schwinge <thomas@schwinge.name>\r
+---\r
+ test/emacs-forgetfulness |   38 ++++++++++++++++++++++++++++++++++++++\r
+ test/notmuch-test        |    1 +\r
+ 2 files changed, 39 insertions(+), 0 deletions(-)\r
+ create mode 100755 test/emacs-forgetfulness\r
+\r
+diff --git a/test/emacs-forgetfulness b/test/emacs-forgetfulness\r
+new file mode 100755\r
+index 0000000..e17b26f\r
+--- /dev/null\r
++++ b/test/emacs-forgetfulness\r
+@@ -0,0 +1,38 @@\r
++#!/bin/bash\r
++\r
++test_description=Emacs\'\ forgetfulness\r
++\r
++. test-lib.sh\r
++\r
++# RFC822 imposes a 998 character limit per line.\r
++x=0123456789 # 10\r
++x=$x$x$x$x$x$x$x$x$x$x # 100\r
++x=$x$x$x$x$x$x$x$x$x # 900\r
++\r
++# If setting this ``too high'' (TODO: yet to be determined), Emacs will crash\r
++# with a segmentation fault.\r
++n=20\r
++for i in $(seq 1 $n); do\r
++  # Roughly 2 KiB per message.  That is, we need two messages in order to\r
++  # exceed the typical size of the pipe buffer (4 KiB on commodity systems).\r
++  generate_message [subject]=$i-$x [from]=$i-$x@x.x\r
++done\r
++# With 20 messages à 2 KiB, we have about 10 full pipe buffers, which should be\r
++# enough to trigger the erroneous behavior.\r
++\r
++notmuch new > /dev/null\r
++\r
++test_begin_subtest 'Search for all messages'\r
++output=$(exec 2>&1; \\r
++         diff -wu \\r
++           <(notmuch search \* \\r
++               | sed \\r
++                   -e 's%^thread:[0-9a-f]*\ %%' \\r
++                   -e 's%;%%'; \\r
++             echo 'End of search results.'; \\r
++             echo) \\r
++           <(test_emacs 2>&1 \\r
++               '(notmuch-search "*") (notmuch-test-wait) (message (buffer-string))'))\r
++test_expect_equal "$output" ''\r
++\r
++test_done\r
+diff --git a/test/notmuch-test b/test/notmuch-test\r
+index 9d77c0f..2f11eac 100755\r
+--- a/test/notmuch-test\r
++++ b/test/notmuch-test\r
+@@ -36,6 +36,7 @@ TESTS="\r
+   encoding\r
+   emacs\r
+   maildir-sync\r
++  emacs-forgetfulness\r
+ "\r
\r
+ # Clean up any results from a previous run\r
+-- \r
+1.7.1\r
+\r