From: Jani Nikula Date: Sat, 22 Feb 2014 22:25:37 +0000 (+0200) Subject: [PATCH v2 06/13] test: make it possible to have several corpora X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=e265ca6f3d7316707b015b087b0975c60c34fe89;p=notmuch-archives.git [PATCH v2 06/13] test: make it possible to have several corpora --- diff --git a/87/556509ee61aafa71fb913fe9bf5774f7025bc9 b/87/556509ee61aafa71fb913fe9bf5774f7025bc9 new file mode 100644 index 000000000..c67c94feb --- /dev/null +++ b/87/556509ee61aafa71fb913fe9bf5774f7025bc9 @@ -0,0 +1,493 @@ +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 EE8A0429E40 + for ; Sat, 22 Feb 2014 14:26:24 -0800 (PST) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References" +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 C36G6Zt1ge40 for ; + Sat, 22 Feb 2014 14:26:20 -0800 (PST) +Received: from mail-ea0-f180.google.com (mail-ea0-f180.google.com + [209.85.215.180]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id 5EA4E431FD6 + for ; Sat, 22 Feb 2014 14:26:04 -0800 (PST) +Received: by mail-ea0-f180.google.com with SMTP id o10so2314447eaj.39 + for ; Sat, 22 Feb 2014 14:26:01 -0800 (PST) +X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; + d=1e100.net; s=20130820; + h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to + :references:in-reply-to:references; + bh=1l+JBvp/jI1uvVkIr0JA2eaNUzm4IAfD8xtQZKaiePw=; + b=XBDOuYd7ZlUxKRnqKwqHyY9/ncV/CkYmkLr6RCQuimnW3ksBvissNmRflemZ0/vzlI + Tgn8BS19K2YSyQASZ97Y4LoIEXy3Au/GwvrxY/sQcbN8ZqJ3+n0oS2zFz2pkHCr0XMV5 + /dnF9MUTznfnhY917G4dNc0UkExDqqp9GyZpoVJQ0LSCyr0t87pgyAjeE0RobfrZqYVS + mBR3dcvQ2aNFODcRzObOmP/DebYp8Y894gz2P9DVBjhHBNQ8XenRnX4Fl2E6qbM3ul7t + 2uiND3IpVtZWdavL1BbiL1oA2KckSoa/jv+yjwofPeqosgcUOHOk7+d7kzzbJp/L7k0p + h3og== +X-Gm-Message-State: + ALoCoQn4qpCdT8GNRAx4YH4mxrvYXitoDN0sFGgB+9gYZl6ISOML6LVEDcByjAEWdqhGoTMYqanz +X-Received: by 10.15.74.130 with SMTP id j2mr16357855eey.116.1393107961837; + Sat, 22 Feb 2014 14:26:01 -0800 (PST) +Received: from localhost (dsl-hkibrasgw2-58c36f-91.dhcp.inet.fi. + [88.195.111.91]) + by mx.google.com with ESMTPSA id f45sm43762761eeg.5.2014.02.22.14.26.00 + for + (version=TLSv1.2 cipher=RC4-SHA bits=128/128); + Sat, 22 Feb 2014 14:26:01 -0800 (PST) +From: Jani Nikula +To: notmuch@notmuchmail.org +Subject: [PATCH v2 06/13] test: make it possible to have several corpora +Date: Sun, 23 Feb 2014 00:25:37 +0200 +Message-Id: + +X-Mailer: git-send-email 1.8.5.3 +In-Reply-To: +References: +In-Reply-To: +References: +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: Sat, 22 Feb 2014 22:26:25 -0000 + +Move the existing corpus under corpus/default, and make it possible to +have multiple corpora under the directory. +--- + test/.gitignore | 2 +- + test/Makefile.local | 2 +- + test/T480-hex-escaping.sh | 4 ++-- + test/corpus/{ => default}/cur/01:2, | 0 + test/corpus/{ => default}/cur/02:2, | 0 + test/corpus/{ => default}/cur/03:2, | 0 + test/corpus/{ => default}/cur/04:2, | 0 + test/corpus/{ => default}/cur/05:2, | 0 + test/corpus/{ => default}/cur/06:2, | 0 + test/corpus/{ => default}/cur/07:2, | 0 + test/corpus/{ => default}/cur/08:2, | 0 + test/corpus/{ => default}/cur/09:2, | 0 + test/corpus/{ => default}/cur/10:2, | 0 + test/corpus/{ => default}/cur/11:2, | 0 + test/corpus/{ => default}/cur/12:2, | 0 + test/corpus/{ => default}/cur/13:2, | 0 + test/corpus/{ => default}/cur/14:2, | 0 + test/corpus/{ => default}/cur/15:2, | 0 + test/corpus/{ => default}/cur/16:2, | 0 + test/corpus/{ => default}/cur/17:2, | 0 + test/corpus/{ => default}/cur/18:2, | 0 + test/corpus/{ => default}/cur/19:2, | 0 + test/corpus/{ => default}/cur/20:2, | 0 + test/corpus/{ => default}/cur/21:2, | 0 + test/corpus/{ => default}/cur/22:2, | 0 + test/corpus/{ => default}/cur/23:2, | 0 + test/corpus/{ => default}/cur/24:2, | 0 + test/corpus/{ => default}/cur/25:2, | 0 + test/corpus/{ => default}/cur/26:2, | 0 + test/corpus/{ => default}/cur/27:2, | 0 + test/corpus/{ => default}/cur/28:2, | 0 + test/corpus/{ => default}/cur/29:2, | 0 + test/corpus/{ => default}/cur/30:2, | 0 + test/corpus/{ => default}/cur/31:2, | 0 + test/corpus/{ => default}/cur/32:2, | 0 + test/corpus/{ => default}/cur/33:2, | 0 + test/corpus/{ => default}/cur/34:2, | 0 + test/corpus/{ => default}/cur/35:2, | 0 + test/corpus/{ => default}/cur/36:2, | 0 + test/corpus/{ => default}/cur/37:2, | 0 + test/corpus/{ => default}/cur/38:2, | 0 + test/corpus/{ => default}/cur/39:2, | 0 + test/corpus/{ => default}/cur/40:2, | 0 + test/corpus/{ => default}/cur/41:2, | 0 + test/corpus/{ => default}/cur/42:2, | 0 + test/corpus/{ => default}/cur/43:2, | 0 + test/corpus/{ => default}/cur/44:2, | 0 + test/corpus/{ => default}/cur/45:2, | 0 + test/corpus/{ => default}/cur/46:2, | 0 + test/corpus/{ => default}/cur/47:2, | 0 + test/corpus/{ => default}/cur/48:2, | 0 + test/corpus/{ => default}/cur/49:2, | 0 + test/corpus/{ => default}/cur/50:2, | 0 + test/corpus/{ => default}/cur/51:2, | 0 + test/corpus/{ => default}/cur/52:2, | 0 + test/corpus/{ => default}/cur/53:2, | 0 + test/notmuch-test | 2 +- + test/test-lib.sh | 21 +++++++++++++-------- + 58 files changed, 18 insertions(+), 13 deletions(-) + rename test/corpus/{ => default}/cur/01:2, (100%) + rename test/corpus/{ => default}/cur/02:2, (100%) + rename test/corpus/{ => default}/cur/03:2, (100%) + rename test/corpus/{ => default}/cur/04:2, (100%) + rename test/corpus/{ => default}/cur/05:2, (100%) + rename test/corpus/{ => default}/cur/06:2, (100%) + rename test/corpus/{ => default}/cur/07:2, (100%) + rename test/corpus/{ => default}/cur/08:2, (100%) + rename test/corpus/{ => default}/cur/09:2, (100%) + rename test/corpus/{ => default}/cur/10:2, (100%) + rename test/corpus/{ => default}/cur/11:2, (100%) + rename test/corpus/{ => default}/cur/12:2, (100%) + rename test/corpus/{ => default}/cur/13:2, (100%) + rename test/corpus/{ => default}/cur/14:2, (100%) + rename test/corpus/{ => default}/cur/15:2, (100%) + rename test/corpus/{ => default}/cur/16:2, (100%) + rename test/corpus/{ => default}/cur/17:2, (100%) + rename test/corpus/{ => default}/cur/18:2, (100%) + rename test/corpus/{ => default}/cur/19:2, (100%) + rename test/corpus/{ => default}/cur/20:2, (100%) + rename test/corpus/{ => default}/cur/21:2, (100%) + rename test/corpus/{ => default}/cur/22:2, (100%) + rename test/corpus/{ => default}/cur/23:2, (100%) + rename test/corpus/{ => default}/cur/24:2, (100%) + rename test/corpus/{ => default}/cur/25:2, (100%) + rename test/corpus/{ => default}/cur/26:2, (100%) + rename test/corpus/{ => default}/cur/27:2, (100%) + rename test/corpus/{ => default}/cur/28:2, (100%) + rename test/corpus/{ => default}/cur/29:2, (100%) + rename test/corpus/{ => default}/cur/30:2, (100%) + rename test/corpus/{ => default}/cur/31:2, (100%) + rename test/corpus/{ => default}/cur/32:2, (100%) + rename test/corpus/{ => default}/cur/33:2, (100%) + rename test/corpus/{ => default}/cur/34:2, (100%) + rename test/corpus/{ => default}/cur/35:2, (100%) + rename test/corpus/{ => default}/cur/36:2, (100%) + rename test/corpus/{ => default}/cur/37:2, (100%) + rename test/corpus/{ => default}/cur/38:2, (100%) + rename test/corpus/{ => default}/cur/39:2, (100%) + rename test/corpus/{ => default}/cur/40:2, (100%) + rename test/corpus/{ => default}/cur/41:2, (100%) + rename test/corpus/{ => default}/cur/42:2, (100%) + rename test/corpus/{ => default}/cur/43:2, (100%) + rename test/corpus/{ => default}/cur/44:2, (100%) + rename test/corpus/{ => default}/cur/45:2, (100%) + rename test/corpus/{ => default}/cur/46:2, (100%) + rename test/corpus/{ => default}/cur/47:2, (100%) + rename test/corpus/{ => default}/cur/48:2, (100%) + rename test/corpus/{ => default}/cur/49:2, (100%) + rename test/corpus/{ => default}/cur/50:2, (100%) + rename test/corpus/{ => default}/cur/51:2, (100%) + rename test/corpus/{ => default}/cur/52:2, (100%) + rename test/corpus/{ => default}/cur/53:2, (100%) + +diff --git a/test/.gitignore b/test/.gitignore +index 97e024878728..ed20d1ac6e42 100644 +--- a/test/.gitignore ++++ b/test/.gitignore +@@ -1,5 +1,5 @@ + test-results +-corpus.mail ++corpus.mail.* + smtp-dummy + symbol-test + arg-test +diff --git a/test/Makefile.local b/test/Makefile.local +index 8870ca374848..20f17629dda3 100644 +--- a/test/Makefile.local ++++ b/test/Makefile.local +@@ -57,4 +57,4 @@ CLEAN := $(CLEAN) $(dir)/smtp-dummy $(dir)/smtp-dummy.o \ + $(dir)/database-test.o \ + $(dir)/random-corpus $(dir)/random-corpus.o \ + $(dir)/parse-time $(dir)/parse-time.o \ +- $(dir)/corpus.mail $(dir)/test-results $(dir)/tmp.* ++ $(dir)/corpus.mail.* $(dir)/test-results $(dir)/tmp.* +diff --git a/test/T480-hex-escaping.sh b/test/T480-hex-escaping.sh +index ad50e1bcc071..15701650df83 100755 +--- a/test/T480-hex-escaping.sh ++++ b/test/T480-hex-escaping.sh +@@ -3,7 +3,7 @@ test_description="hex encoding and decoding" + . ./test-lib.sh + + test_begin_subtest "round trip" +-find $TEST_DIRECTORY/corpus -type f -print | sort | xargs cat > EXPECTED ++find $TEST_DIRECTORY/corpus/default -type f -print | sort | xargs cat > EXPECTED + $TEST_DIRECTORY/hex-xcode --direction=encode < EXPECTED | $TEST_DIRECTORY/hex-xcode --direction=decode > OUTPUT + test_expect_equal_file OUTPUT EXPECTED + +@@ -25,7 +25,7 @@ $TEST_DIRECTORY/hex-xcode --direction=decode < EXPECTED.$test_count |\ + test_expect_equal_file EXPECTED.$test_count OUTPUT.$test_count + + test_begin_subtest "round trip (in-place)" +-find $TEST_DIRECTORY/corpus -type f -print | sort | xargs cat > EXPECTED ++find $TEST_DIRECTORY/corpus/default -type f -print | sort | xargs cat > EXPECTED + $TEST_DIRECTORY/hex-xcode --in-place --direction=encode < EXPECTED |\ + $TEST_DIRECTORY/hex-xcode --in-place --direction=decode > OUTPUT + test_expect_equal_file OUTPUT EXPECTED +diff --git a/test/corpus/cur/01:2, b/test/corpus/default/cur/01:2, +similarity index 100% +rename from test/corpus/cur/01:2, +rename to test/corpus/default/cur/01:2, +diff --git a/test/corpus/cur/02:2, b/test/corpus/default/cur/02:2, +similarity index 100% +rename from test/corpus/cur/02:2, +rename to test/corpus/default/cur/02:2, +diff --git a/test/corpus/cur/03:2, b/test/corpus/default/cur/03:2, +similarity index 100% +rename from test/corpus/cur/03:2, +rename to test/corpus/default/cur/03:2, +diff --git a/test/corpus/cur/04:2, b/test/corpus/default/cur/04:2, +similarity index 100% +rename from test/corpus/cur/04:2, +rename to test/corpus/default/cur/04:2, +diff --git a/test/corpus/cur/05:2, b/test/corpus/default/cur/05:2, +similarity index 100% +rename from test/corpus/cur/05:2, +rename to test/corpus/default/cur/05:2, +diff --git a/test/corpus/cur/06:2, b/test/corpus/default/cur/06:2, +similarity index 100% +rename from test/corpus/cur/06:2, +rename to test/corpus/default/cur/06:2, +diff --git a/test/corpus/cur/07:2, b/test/corpus/default/cur/07:2, +similarity index 100% +rename from test/corpus/cur/07:2, +rename to test/corpus/default/cur/07:2, +diff --git a/test/corpus/cur/08:2, b/test/corpus/default/cur/08:2, +similarity index 100% +rename from test/corpus/cur/08:2, +rename to test/corpus/default/cur/08:2, +diff --git a/test/corpus/cur/09:2, b/test/corpus/default/cur/09:2, +similarity index 100% +rename from test/corpus/cur/09:2, +rename to test/corpus/default/cur/09:2, +diff --git a/test/corpus/cur/10:2, b/test/corpus/default/cur/10:2, +similarity index 100% +rename from test/corpus/cur/10:2, +rename to test/corpus/default/cur/10:2, +diff --git a/test/corpus/cur/11:2, b/test/corpus/default/cur/11:2, +similarity index 100% +rename from test/corpus/cur/11:2, +rename to test/corpus/default/cur/11:2, +diff --git a/test/corpus/cur/12:2, b/test/corpus/default/cur/12:2, +similarity index 100% +rename from test/corpus/cur/12:2, +rename to test/corpus/default/cur/12:2, +diff --git a/test/corpus/cur/13:2, b/test/corpus/default/cur/13:2, +similarity index 100% +rename from test/corpus/cur/13:2, +rename to test/corpus/default/cur/13:2, +diff --git a/test/corpus/cur/14:2, b/test/corpus/default/cur/14:2, +similarity index 100% +rename from test/corpus/cur/14:2, +rename to test/corpus/default/cur/14:2, +diff --git a/test/corpus/cur/15:2, b/test/corpus/default/cur/15:2, +similarity index 100% +rename from test/corpus/cur/15:2, +rename to test/corpus/default/cur/15:2, +diff --git a/test/corpus/cur/16:2, b/test/corpus/default/cur/16:2, +similarity index 100% +rename from test/corpus/cur/16:2, +rename to test/corpus/default/cur/16:2, +diff --git a/test/corpus/cur/17:2, b/test/corpus/default/cur/17:2, +similarity index 100% +rename from test/corpus/cur/17:2, +rename to test/corpus/default/cur/17:2, +diff --git a/test/corpus/cur/18:2, b/test/corpus/default/cur/18:2, +similarity index 100% +rename from test/corpus/cur/18:2, +rename to test/corpus/default/cur/18:2, +diff --git a/test/corpus/cur/19:2, b/test/corpus/default/cur/19:2, +similarity index 100% +rename from test/corpus/cur/19:2, +rename to test/corpus/default/cur/19:2, +diff --git a/test/corpus/cur/20:2, b/test/corpus/default/cur/20:2, +similarity index 100% +rename from test/corpus/cur/20:2, +rename to test/corpus/default/cur/20:2, +diff --git a/test/corpus/cur/21:2, b/test/corpus/default/cur/21:2, +similarity index 100% +rename from test/corpus/cur/21:2, +rename to test/corpus/default/cur/21:2, +diff --git a/test/corpus/cur/22:2, b/test/corpus/default/cur/22:2, +similarity index 100% +rename from test/corpus/cur/22:2, +rename to test/corpus/default/cur/22:2, +diff --git a/test/corpus/cur/23:2, b/test/corpus/default/cur/23:2, +similarity index 100% +rename from test/corpus/cur/23:2, +rename to test/corpus/default/cur/23:2, +diff --git a/test/corpus/cur/24:2, b/test/corpus/default/cur/24:2, +similarity index 100% +rename from test/corpus/cur/24:2, +rename to test/corpus/default/cur/24:2, +diff --git a/test/corpus/cur/25:2, b/test/corpus/default/cur/25:2, +similarity index 100% +rename from test/corpus/cur/25:2, +rename to test/corpus/default/cur/25:2, +diff --git a/test/corpus/cur/26:2, b/test/corpus/default/cur/26:2, +similarity index 100% +rename from test/corpus/cur/26:2, +rename to test/corpus/default/cur/26:2, +diff --git a/test/corpus/cur/27:2, b/test/corpus/default/cur/27:2, +similarity index 100% +rename from test/corpus/cur/27:2, +rename to test/corpus/default/cur/27:2, +diff --git a/test/corpus/cur/28:2, b/test/corpus/default/cur/28:2, +similarity index 100% +rename from test/corpus/cur/28:2, +rename to test/corpus/default/cur/28:2, +diff --git a/test/corpus/cur/29:2, b/test/corpus/default/cur/29:2, +similarity index 100% +rename from test/corpus/cur/29:2, +rename to test/corpus/default/cur/29:2, +diff --git a/test/corpus/cur/30:2, b/test/corpus/default/cur/30:2, +similarity index 100% +rename from test/corpus/cur/30:2, +rename to test/corpus/default/cur/30:2, +diff --git a/test/corpus/cur/31:2, b/test/corpus/default/cur/31:2, +similarity index 100% +rename from test/corpus/cur/31:2, +rename to test/corpus/default/cur/31:2, +diff --git a/test/corpus/cur/32:2, b/test/corpus/default/cur/32:2, +similarity index 100% +rename from test/corpus/cur/32:2, +rename to test/corpus/default/cur/32:2, +diff --git a/test/corpus/cur/33:2, b/test/corpus/default/cur/33:2, +similarity index 100% +rename from test/corpus/cur/33:2, +rename to test/corpus/default/cur/33:2, +diff --git a/test/corpus/cur/34:2, b/test/corpus/default/cur/34:2, +similarity index 100% +rename from test/corpus/cur/34:2, +rename to test/corpus/default/cur/34:2, +diff --git a/test/corpus/cur/35:2, b/test/corpus/default/cur/35:2, +similarity index 100% +rename from test/corpus/cur/35:2, +rename to test/corpus/default/cur/35:2, +diff --git a/test/corpus/cur/36:2, b/test/corpus/default/cur/36:2, +similarity index 100% +rename from test/corpus/cur/36:2, +rename to test/corpus/default/cur/36:2, +diff --git a/test/corpus/cur/37:2, b/test/corpus/default/cur/37:2, +similarity index 100% +rename from test/corpus/cur/37:2, +rename to test/corpus/default/cur/37:2, +diff --git a/test/corpus/cur/38:2, b/test/corpus/default/cur/38:2, +similarity index 100% +rename from test/corpus/cur/38:2, +rename to test/corpus/default/cur/38:2, +diff --git a/test/corpus/cur/39:2, b/test/corpus/default/cur/39:2, +similarity index 100% +rename from test/corpus/cur/39:2, +rename to test/corpus/default/cur/39:2, +diff --git a/test/corpus/cur/40:2, b/test/corpus/default/cur/40:2, +similarity index 100% +rename from test/corpus/cur/40:2, +rename to test/corpus/default/cur/40:2, +diff --git a/test/corpus/cur/41:2, b/test/corpus/default/cur/41:2, +similarity index 100% +rename from test/corpus/cur/41:2, +rename to test/corpus/default/cur/41:2, +diff --git a/test/corpus/cur/42:2, b/test/corpus/default/cur/42:2, +similarity index 100% +rename from test/corpus/cur/42:2, +rename to test/corpus/default/cur/42:2, +diff --git a/test/corpus/cur/43:2, b/test/corpus/default/cur/43:2, +similarity index 100% +rename from test/corpus/cur/43:2, +rename to test/corpus/default/cur/43:2, +diff --git a/test/corpus/cur/44:2, b/test/corpus/default/cur/44:2, +similarity index 100% +rename from test/corpus/cur/44:2, +rename to test/corpus/default/cur/44:2, +diff --git a/test/corpus/cur/45:2, b/test/corpus/default/cur/45:2, +similarity index 100% +rename from test/corpus/cur/45:2, +rename to test/corpus/default/cur/45:2, +diff --git a/test/corpus/cur/46:2, b/test/corpus/default/cur/46:2, +similarity index 100% +rename from test/corpus/cur/46:2, +rename to test/corpus/default/cur/46:2, +diff --git a/test/corpus/cur/47:2, b/test/corpus/default/cur/47:2, +similarity index 100% +rename from test/corpus/cur/47:2, +rename to test/corpus/default/cur/47:2, +diff --git a/test/corpus/cur/48:2, b/test/corpus/default/cur/48:2, +similarity index 100% +rename from test/corpus/cur/48:2, +rename to test/corpus/default/cur/48:2, +diff --git a/test/corpus/cur/49:2, b/test/corpus/default/cur/49:2, +similarity index 100% +rename from test/corpus/cur/49:2, +rename to test/corpus/default/cur/49:2, +diff --git a/test/corpus/cur/50:2, b/test/corpus/default/cur/50:2, +similarity index 100% +rename from test/corpus/cur/50:2, +rename to test/corpus/default/cur/50:2, +diff --git a/test/corpus/cur/51:2, b/test/corpus/default/cur/51:2, +similarity index 100% +rename from test/corpus/cur/51:2, +rename to test/corpus/default/cur/51:2, +diff --git a/test/corpus/cur/52:2, b/test/corpus/default/cur/52:2, +similarity index 100% +rename from test/corpus/cur/52:2, +rename to test/corpus/default/cur/52:2, +diff --git a/test/corpus/cur/53:2, b/test/corpus/default/cur/53:2, +similarity index 100% +rename from test/corpus/cur/53:2, +rename to test/corpus/default/cur/53:2, +diff --git a/test/notmuch-test b/test/notmuch-test +index b8437127c01f..6598f428d14f 100755 +--- a/test/notmuch-test ++++ b/test/notmuch-test +@@ -49,6 +49,6 @@ echo + ev=$? + + # Clean up +-rm -rf test-results corpus.mail ++rm -rf test-results corpus.mail.* + + exit $ev +diff --git a/test/test-lib.sh b/test/test-lib.sh +index 78af170fe739..69070f26e4fe 100644 +--- a/test/test-lib.sh ++++ b/test/test-lib.sh +@@ -516,19 +516,24 @@ emacs_fcc_message () + + # Generate a corpus of email and add it to the database. + # +-# This corpus is fixed, (it happens to be 50 messages from early in +-# the history of the notmuch mailing list), which allows for reliably +-# testing commands that need to operate on a not-totally-trivial +-# number of messages. ++# The first parameter defines the corpus to pick under the corpus ++# directory, defaulting to "default". ++# ++# The default corpus is fixed, (it happens to be 50 messages from ++# early in the history of the notmuch mailing list), which allows for ++# reliably testing commands that need to operate on a ++# not-totally-trivial number of messages. + add_email_corpus () + { ++ local corpus=${1:-default} ++ + rm -rf ${MAIL_DIR} +- if [ -d $TEST_DIRECTORY/corpus.mail ]; then +- cp -a $TEST_DIRECTORY/corpus.mail ${MAIL_DIR} ++ if [ -d $TEST_DIRECTORY/corpus.mail.${corpus} ]; then ++ cp -a $TEST_DIRECTORY/corpus.mail.${corpus} ${MAIL_DIR} + else +- cp -a $TEST_DIRECTORY/corpus ${MAIL_DIR} ++ cp -a $TEST_DIRECTORY/corpus/${corpus} ${MAIL_DIR} + notmuch new >/dev/null +- cp -a ${MAIL_DIR} $TEST_DIRECTORY/corpus.mail ++ cp -a ${MAIL_DIR} $TEST_DIRECTORY/corpus.mail.${corpus} + fi + } + +-- +1.8.5.3 +