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