[PATCH v2 2/2] test: add tests for --output=messages --duplicate=N
authorJani Nikula <jani@nikula.org>
Sat, 1 Nov 2014 09:31:07 +0000 (11:31 +0200)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 18:06:02 +0000 (10:06 -0800)
d2/83c11c8287c734b69752731ff968b91143dd3b [new file with mode: 0644]

diff --git a/d2/83c11c8287c734b69752731ff968b91143dd3b b/d2/83c11c8287c734b69752731ff968b91143dd3b
new file mode 100644 (file)
index 0000000..4b03cff
--- /dev/null
@@ -0,0 +1,133 @@
+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 75AB9431FD0\r
+       for <notmuch@notmuchmail.org>; Sat,  1 Nov 2014 02:31:22 -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.613\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=0.613 tagged_above=-999 required=5\r
+       tests=[RCVD_IN_DNSWL_LOW=-0.7, URI_HEX=1.313] 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 vjLOA10YLgPb for <notmuch@notmuchmail.org>;\r
+       Sat,  1 Nov 2014 02:31:17 -0700 (PDT)\r
+Received: from mail-wg0-f49.google.com (mail-wg0-f49.google.com\r
+ [74.125.82.49])       (using TLSv1 with cipher RC4-SHA (128/128 bits))        (No client\r
+ certificate requested)        by olra.theworths.org (Postfix) with ESMTPS id\r
+ 07575431FD4   for <notmuch@notmuchmail.org>; Sat,  1 Nov 2014 02:31:16 -0700\r
+ (PDT)\r
+Received: by mail-wg0-f49.google.com with SMTP id x13so7944927wgg.22\r
+       for <notmuch@notmuchmail.org>; Sat, 01 Nov 2014 02:31:15 -0700 (PDT)\r
+X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\r
+       d=1e100.net; s=20130820;\r
+       h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\r
+       :references:in-reply-to:references;\r
+       bh=kmcedXBDoWcBJ2/jpd1pPTaE8iQ9uFWte+3famW+azA=;\r
+       b=PRNqmGxNJwwFhertYJ1jJrrMKjGvGai6m2j/0kMFzXFaeqGAxo5J5bfrt8AWV5x0eA\r
+       o7PUQFt92NbXNWFG/+8j1lFpOsgG8n90FPpQm9ATADQ52SiHv6NTCP5oLdE1IXPlOD8C\r
+       pbl9kMX95WmDntwhSxLOzfSxvMwrtT0afBVYJqrXrPyQYYph8k4FjwfWtIEX+G9hTc/f\r
+       V8cgMo1w2hg0zDcGbPipxAOCzSbxtAWbyvgofy7ix6aUhe36jZO2aMzJb72Vrk8hJIbD\r
+       u/Z+dwIy8zv8b8sgbfIkfI+gu2nqjtEN3Ap4WNqUIZ+2Fsmk7pEPKyBrv/mtPwtq71Lr\r
+       HTdg==\r
+X-Gm-Message-State:\r
+ ALoCoQl8hdeej0h6n4nvEgp+o6DprS0lktboeuYWsXi+tDqBZw9/xVny5biqVXWmdSGGpTWX0Ksk\r
+X-Received: by 10.194.239.104 with SMTP id vr8mr7550509wjc.18.1414834275820;\r
+       Sat, 01 Nov 2014 02:31:15 -0700 (PDT)\r
+Received: from localhost (dsl-hkibrasgw2-58c36d-48.dhcp.inet.fi.\r
+       [88.195.109.48])\r
+       by mx.google.com with ESMTPSA id cs2sm1391339wib.2.2014.11.01.02.31.14\r
+       for <multiple recipients>\r
+       (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\r
+       Sat, 01 Nov 2014 02:31:15 -0700 (PDT)\r
+From: Jani Nikula <jani@nikula.org>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH v2 2/2] test: add tests for --output=messages --duplicate=N\r
+Date: Sat,  1 Nov 2014 11:31:07 +0200\r
+Message-Id:\r
+ <eea379e10ceda78c1864316c6a2529967a7dfb14.1414834143.git.jani@nikula.org>\r
+X-Mailer: git-send-email 2.1.1\r
+In-Reply-To: <cover.1414834143.git.jani@nikula.org>\r
+References: <cover.1414834143.git.jani@nikula.org>\r
+In-Reply-To: <cover.1414834143.git.jani@nikula.org>\r
+References: <cover.1414834143.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, 01 Nov 2014 09:31:22 -0000\r
+\r
+Basic smoke tests for the feature, nothing fancy.\r
+---\r
+ test/T090-search-output.sh | 37 +++++++++++++++++++++++++++++++++++++\r
+ 1 file changed, 37 insertions(+)\r
+\r
+diff --git a/test/T090-search-output.sh b/test/T090-search-output.sh\r
+index 947d572ebeff..fe2ec9af8c2a 100755\r
+--- a/test/T090-search-output.sh\r
++++ b/test/T090-search-output.sh\r
+@@ -122,6 +122,24 @@ id:1258471718-6781-1-git-send-email-dottedmag@dottedmag.net\r
+ EOF\r
+ test_expect_equal_file OUTPUT EXPECTED\r
\r
++test_begin_subtest "--output=messages --duplicate=1"\r
++notmuch search --output=messages --duplicate=1 '*' >OUTPUT\r
++# reuse same EXPECTED as above\r
++test_expect_equal_file OUTPUT EXPECTED\r
++\r
++test_begin_subtest "--output=messages --duplicate=2"\r
++notmuch search --output=messages --duplicate=2 '*' >OUTPUT\r
++cat <<EOF >EXPECTED\r
++id:20091117232137.GA7669@griffis1.net\r
++EOF\r
++test_expect_equal_file OUTPUT EXPECTED\r
++\r
++test_begin_subtest "--output=messages --duplicate=3"\r
++notmuch search --output=messages --duplicate=3 '*' >OUTPUT\r
++cat <<EOF >EXPECTED\r
++EOF\r
++test_expect_equal_file OUTPUT EXPECTED\r
++\r
+ test_begin_subtest "--output=messages --format=json"\r
+ notmuch search --format=json --output=messages '*' >OUTPUT\r
+ cat <<EOF >EXPECTED\r
+@@ -180,6 +198,25 @@ cat <<EOF >EXPECTED\r
+ EOF\r
+ test_expect_equal_file OUTPUT EXPECTED\r
\r
++test_begin_subtest "--output=messages --format=json --duplicate=1"\r
++notmuch search --output=messages --format=json --duplicate=1 '*' >OUTPUT\r
++# reuse same EXPECTED as above\r
++test_expect_equal_file OUTPUT EXPECTED\r
++\r
++test_begin_subtest "--output=messages --format=json --duplicate=2"\r
++notmuch search --output=messages --format=json --duplicate=2 '*' >OUTPUT\r
++cat <<EOF >EXPECTED\r
++["20091117232137.GA7669@griffis1.net"]\r
++EOF\r
++test_expect_equal_file OUTPUT EXPECTED\r
++\r
++test_begin_subtest "--output=messages --format=json --duplicate=3"\r
++notmuch search --output=messages --format=json --duplicate=3 '*' >OUTPUT\r
++cat <<EOF >EXPECTED\r
++[]\r
++EOF\r
++test_expect_equal_file OUTPUT EXPECTED\r
++\r
+ test_begin_subtest "--output=files"\r
+ notmuch search --output=files '*' | notmuch_search_files_sanitize | sort >OUTPUT\r
+ cat <<EOF >EXPECTED\r
+-- \r
+2.1.1\r
+\r