aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/corpus/01:2,
diff options
context:
space:
mode:
authorGravatar Jani Nikula <jani@nikula.org>2014-03-09 14:25:37 +0200
committerGravatar David Bremner <david@tethera.net>2014-03-11 19:50:12 -0300
commitded713c39d8b0221a3b1b2b52a74966c20c3aba8 (patch)
tree018da27a979738c09760b5fbbda3253cc5ff998f /test/corpus/01:2,
parent7630f300ba52f4aab22ee696fe1507d0ef9790bc (diff)
test: rearrange the test corpus into subfolders, fix tests
We will need this for improved folder search tests, but having some folders should exercise our code paths better anyway. Modify the relevant test accordingly to make it pass. This reorganization triggers a bug in the test suite, namely that it expects the output of --output=files to be in a certain order. So we add the fix for that into the same commit. This mainly involves sorting, although the case --duplicate=$n requires more subtlety.
Diffstat (limited to 'test/corpus/01:2,')
-rw-r--r--test/corpus/01:2,34
1 files changed, 34 insertions, 0 deletions
diff --git a/test/corpus/01:2, b/test/corpus/01:2,
new file mode 100644
index 00000000..7e9e3490
--- /dev/null
+++ b/test/corpus/01:2,
@@ -0,0 +1,34 @@
+From: "Mikhail Gusarov" <dottedmag@dottedmag.net>
+To: notmuch@notmuchmail.org
+Date: Tue, 17 Nov 2009 21:28:37 +0600
+Subject: [notmuch] [PATCH 1/2] Close message file after parsing message
+ headers
+Message-ID: <1258471718-6781-1-git-send-email-dottedmag@dottedmag.net>
+
+Keeping unused files open helps to see "Too many open files" often.
+
+Signed-off-by: Mikhail Gusarov <dottedmag at dottedmag.net>
+---
+ lib/message-file.c | 5 +++++
+ 1 files changed, 5 insertions(+), 0 deletions(-)
+
+diff --git a/lib/message-file.c b/lib/message-file.c
+index 8a3f8ee..197ab01 100644
+--- a/lib/message-file.c
++++ b/lib/message-file.c
+@@ -325,6 +325,11 @@ notmuch_message_file_get_header (notmuch_message_file_t *message,
+ return decoded_value;
+ }
+
++ if (message->parsing_finished) {
++ fclose (message->file);
++ message->file = NULL;
++ }
++
+ if (message->line)
+ free (message->line);
+ message->line = NULL;
+--
+1.6.3.3
+
+