[PATCH v3 2/8] test: test notmuch search --duplicate=N
authorJani Nikula <jani@nikula.org>
Sat, 17 Aug 2013 12:11:27 +0000 (15:11 +0300)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:56:22 +0000 (09:56 -0800)
be/e65e013d954036873d8fa6fd0082b29c9b6d3f [new file with mode: 0644]

diff --git a/be/e65e013d954036873d8fa6fd0082b29c9b6d3f b/be/e65e013d954036873d8fa6fd0082b29c9b6d3f
new file mode 100644 (file)
index 0000000..795067b
--- /dev/null
@@ -0,0 +1,160 @@
+Return-Path: <jani@nikula.org>\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 415C3429E58\r
+       for <notmuch@notmuchmail.org>; Sat, 17 Aug 2013 05:11:47 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References"\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.7\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5\r
+       tests=[RCVD_IN_DNSWL_LOW=-0.7] 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 iSl3OUBVQmu3 for <notmuch@notmuchmail.org>;\r
+       Sat, 17 Aug 2013 05:11:42 -0700 (PDT)\r
+Received: from mail-bk0-f43.google.com (mail-bk0-f43.google.com\r
+       [209.85.214.43]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
+       (No client certificate requested)\r
+       by olra.theworths.org (Postfix) with ESMTPS id D7836429E59\r
+       for <notmuch@notmuchmail.org>; Sat, 17 Aug 2013 05:11:37 -0700 (PDT)\r
+Received: by mail-bk0-f43.google.com with SMTP id mz13so907390bkb.2\r
+       for <notmuch@notmuchmail.org>; Sat, 17 Aug 2013 05:11:36 -0700 (PDT)\r
+X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\r
+       d=google.com; s=20120113;\r
+       h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\r
+       :references:in-reply-to:references;\r
+       bh=vUOadL1+0/RpoLGtNCyP7EhDDb2j0Ct+vSFU1J+DCvM=;\r
+       b=KkVo4uOn+EwxiA1AEmZ/7kSjf7mDkuWxd/Q+Wbx3tuzv9babeByrCiBrk5Bxc+/Jqs\r
+       ssMA3p7kCmBK0PKYXlUbRITw7pgsCHGyFOhHYO/1TIWMku9As4YlLwdKONS82jq6aeWx\r
+       xA1yMXCJOifZkHo9uPTzQUdmce316BVuK+thMgo0vKGEvYFuId8/Z46oZBbStc1RR8U/\r
+       23HCP5a6F9QM9HNtGYHdv2+YJPBqLiuaeLBNprAr0MYCt/hJSmRmdlYv3Pd/e2pUDOdo\r
+       ZsFIU/Ux/TIeJY5+68izqYSHEoE9jHlq7JvBiHPlk26KNr9JT91wtAznlrClqB4CYcCx\r
+       dTUQ==\r
+X-Gm-Message-State:\r
+ ALoCoQnsUa+V5xGlgdEZb8CHhDVYjIqPVTL+G69s4+DzUBp7oVw5fv9GjxR0f4+U5tr+OsT5nLb/\r
+X-Received: by 10.204.224.142 with SMTP id io14mr1957bkb.27.1376741496524;\r
+       Sat, 17 Aug 2013 05:11:36 -0700 (PDT)\r
+Received: from localhost (dsl-hkibrasgw2-58c36f-91.dhcp.inet.fi.\r
+       [88.195.111.91])\r
+       by mx.google.com with ESMTPSA id pn6sm249358bkb.14.1969.12.31.16.00.00\r
+       (version=TLSv1.2 cipher=RC4-SHA bits=128/128);\r
+       Sat, 17 Aug 2013 05:11:35 -0700 (PDT)\r
+From: Jani Nikula <jani@nikula.org>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH v3 2/8] test: test notmuch search --duplicate=N\r
+Date: Sat, 17 Aug 2013 15:11:27 +0300\r
+Message-Id:\r
+ <88dc38a1e8c4c15bfb84586bdef9e6b60fc4c290.1376741447.git.jani@nikula.org>\r
+X-Mailer: git-send-email 1.7.10.4\r
+In-Reply-To: <cover.1376741447.git.jani@nikula.org>\r
+References: <cover.1376741447.git.jani@nikula.org>\r
+In-Reply-To: <cover.1376741447.git.jani@nikula.org>\r
+References: <cover.1376741447.git.jani@nikula.org>\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: Sat, 17 Aug 2013 12:11:47 -0000\r
+\r
+Add test for notmuch search --duplicate=N option.\r
+---\r
+ test/search-output |   65 ++++++++++++++++++++++++++++++++++++++++++++++++++++\r
+ 1 file changed, 65 insertions(+)\r
+\r
+diff --git a/test/search-output b/test/search-output\r
+index c2a87eb..5ccfeaf 100755\r
+--- a/test/search-output\r
++++ b/test/search-output\r
+@@ -239,6 +239,64 @@ MAIL_DIR/cur/01:2,\r
+ EOF\r
+ test_expect_equal_file OUTPUT EXPECTED\r
\r
++test_begin_subtest "--output=files --duplicate=1"\r
++notmuch search --output=files --duplicate=1 '*' | sed -e "s,$MAIL_DIR,MAIL_DIR," >OUTPUT\r
++cat <<EOF >EXPECTED\r
++MAIL_DIR/cur/52:2,\r
++MAIL_DIR/cur/53:2,\r
++MAIL_DIR/cur/50:2,\r
++MAIL_DIR/cur/49:2,\r
++MAIL_DIR/cur/48:2,\r
++MAIL_DIR/cur/47:2,\r
++MAIL_DIR/cur/46:2,\r
++MAIL_DIR/cur/45:2,\r
++MAIL_DIR/cur/44:2,\r
++MAIL_DIR/cur/43:2,\r
++MAIL_DIR/cur/42:2,\r
++MAIL_DIR/cur/41:2,\r
++MAIL_DIR/cur/40:2,\r
++MAIL_DIR/cur/39:2,\r
++MAIL_DIR/cur/38:2,\r
++MAIL_DIR/cur/37:2,\r
++MAIL_DIR/cur/36:2,\r
++MAIL_DIR/cur/35:2,\r
++MAIL_DIR/cur/34:2,\r
++MAIL_DIR/cur/33:2,\r
++MAIL_DIR/cur/32:2,\r
++MAIL_DIR/cur/31:2,\r
++MAIL_DIR/cur/30:2,\r
++MAIL_DIR/cur/29:2,\r
++MAIL_DIR/cur/28:2,\r
++MAIL_DIR/cur/27:2,\r
++MAIL_DIR/cur/26:2,\r
++MAIL_DIR/cur/25:2,\r
++MAIL_DIR/cur/24:2,\r
++MAIL_DIR/cur/23:2,\r
++MAIL_DIR/cur/22:2,\r
++MAIL_DIR/cur/21:2,\r
++MAIL_DIR/cur/19:2,\r
++MAIL_DIR/cur/18:2,\r
++MAIL_DIR/cur/20:2,\r
++MAIL_DIR/cur/17:2,\r
++MAIL_DIR/cur/16:2,\r
++MAIL_DIR/cur/15:2,\r
++MAIL_DIR/cur/14:2,\r
++MAIL_DIR/cur/13:2,\r
++MAIL_DIR/cur/12:2,\r
++MAIL_DIR/cur/11:2,\r
++MAIL_DIR/cur/10:2,\r
++MAIL_DIR/cur/09:2,\r
++MAIL_DIR/cur/08:2,\r
++MAIL_DIR/cur/06:2,\r
++MAIL_DIR/cur/05:2,\r
++MAIL_DIR/cur/04:2,\r
++MAIL_DIR/cur/03:2,\r
++MAIL_DIR/cur/07:2,\r
++MAIL_DIR/cur/02:2,\r
++MAIL_DIR/cur/01:2,\r
++EOF\r
++test_expect_equal_file OUTPUT EXPECTED\r
++\r
+ test_begin_subtest "--output=files --format=json"\r
+ notmuch search --format=json --output=files '*' | sed -e "s,$MAIL_DIR,MAIL_DIR," >OUTPUT\r
+ cat <<EOF >EXPECTED\r
+@@ -298,6 +356,13 @@ cat <<EOF >EXPECTED\r
+ EOF\r
+ test_expect_equal_file OUTPUT EXPECTED\r
\r
++test_begin_subtest "--output=files --format=json --duplicate=2"\r
++notmuch search --format=json --output=files --duplicate=2 '*' | sed -e "s,$MAIL_DIR,MAIL_DIR," >OUTPUT\r
++cat <<EOF >EXPECTED\r
++["MAIL_DIR/cur/51:2,"]\r
++EOF\r
++test_expect_equal_file OUTPUT EXPECTED\r
++\r
+ test_begin_subtest "--output=tags"\r
+ notmuch search --output=tags '*' >OUTPUT\r
+ cat <<EOF >EXPECTED\r
+-- \r
+1.7.10.4\r
+\r