From f212b435372c3ce68b588a98cc3712f0c28d44c9 Mon Sep 17 00:00:00 2001 From: Jani Nikula Date: Sun, 9 Jun 2013 14:03:08 +0300 Subject: [PATCH] [PATCH v2 2/7] test: test notmuch search --duplicate=N --- 3b/3532cdc232287638c1f9575078054539faf1ae | 160 ++++++++++++++++++++++ 1 file changed, 160 insertions(+) create mode 100644 3b/3532cdc232287638c1f9575078054539faf1ae diff --git a/3b/3532cdc232287638c1f9575078054539faf1ae b/3b/3532cdc232287638c1f9575078054539faf1ae new file mode 100644 index 000000000..78fa1f961 --- /dev/null +++ b/3b/3532cdc232287638c1f9575078054539faf1ae @@ -0,0 +1,160 @@ +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 CCA14431FC2 + for ; Sun, 9 Jun 2013 04:03:49 -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.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 DznOo6B4Fvlq for ; + Sun, 9 Jun 2013 04:03:44 -0700 (PDT) +Received: from mail-la0-f50.google.com (mail-la0-f50.google.com + [209.85.215.50]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id C8AF0431FC4 + for ; Sun, 9 Jun 2013 04:03:29 -0700 (PDT) +Received: by mail-la0-f50.google.com with SMTP id dy20so2676519lab.37 + for ; Sun, 09 Jun 2013 04:03:27 -0700 (PDT) +X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; + d=google.com; s=20120113; + h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references + :in-reply-to:references:x-gm-message-state; + bh=Dp1aDTJulphquNdqxF5P779ZaOaoYtmOKwiNWp07El4=; + b=oCwH3wjwJioZXCX0GgesL5/MutgntU9hCRPgdugfDemAlwQ57+c2P/mPbpo53Eewun + lXUPb3ZPpDjGbdqnaawvAJWP91JqulsKURPIKJYj95pv2HNRIzfL0lOfOCoPt0wzkhct + 5uXSGsmM22avKfuQHjfIYbVcG3+7bI9+fY/TJh512AjCnbCtx10bTWsrHaukGyGVQ060 + myiANvBYV6xtm0Ef/EuziWr+7pT9hmIGxuOWMGeaSPLaMKm5FH7vU+0SDgihh+tCXFLX + hjNqeUdbrDjjeJAzJgwnFlN8bKnozJd1jFZDJgAwzMogV2tJwOV1t7OPXAYwHvRlXhrk + U5RA== +X-Received: by 10.152.7.103 with SMTP id i7mr2829975laa.39.1370775806946; + Sun, 09 Jun 2013 04:03:26 -0700 (PDT) +Received: from localhost (dsl-hkibrasgw2-58c376-211.dhcp.inet.fi. + [88.195.118.211]) + by mx.google.com with ESMTPSA id h8sm2293507laf.1.2013.06.09.04.03.24 + for + (version=TLSv1.2 cipher=RC4-SHA bits=128/128); + Sun, 09 Jun 2013 04:03:26 -0700 (PDT) +From: Jani Nikula +To: notmuch@notmuchmail.org +Subject: [PATCH v2 2/7] test: test notmuch search --duplicate=N +Date: Sun, 9 Jun 2013 14:03:08 +0300 +Message-Id: + <83f79d7ef1f1e817a3157ba71a7b617f3dead9eb.1370775663.git.jani@nikula.org> +X-Mailer: git-send-email 1.7.10.4 +In-Reply-To: +References: +In-Reply-To: +References: +X-Gm-Message-State: + ALoCoQk9YgLRelPfh4E8fo3SYkR4NVOzZdws1yZldpHVJqP3HNVV/emrU40QFvFqUwQrIQdd7ri3 +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: Sun, 09 Jun 2013 11:03:50 -0000 + +--- + test/search-output | 65 ++++++++++++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 65 insertions(+) + +diff --git a/test/search-output b/test/search-output +index c2a87eb..5ccfeaf 100755 +--- a/test/search-output ++++ b/test/search-output +@@ -239,6 +239,64 @@ MAIL_DIR/cur/01:2, + EOF + test_expect_equal_file OUTPUT EXPECTED + ++test_begin_subtest "--output=files --duplicate=1" ++notmuch search --output=files --duplicate=1 '*' | sed -e "s,$MAIL_DIR,MAIL_DIR," >OUTPUT ++cat <EXPECTED ++MAIL_DIR/cur/52:2, ++MAIL_DIR/cur/53:2, ++MAIL_DIR/cur/50:2, ++MAIL_DIR/cur/49:2, ++MAIL_DIR/cur/48:2, ++MAIL_DIR/cur/47:2, ++MAIL_DIR/cur/46:2, ++MAIL_DIR/cur/45:2, ++MAIL_DIR/cur/44:2, ++MAIL_DIR/cur/43:2, ++MAIL_DIR/cur/42:2, ++MAIL_DIR/cur/41:2, ++MAIL_DIR/cur/40:2, ++MAIL_DIR/cur/39:2, ++MAIL_DIR/cur/38:2, ++MAIL_DIR/cur/37:2, ++MAIL_DIR/cur/36:2, ++MAIL_DIR/cur/35:2, ++MAIL_DIR/cur/34:2, ++MAIL_DIR/cur/33:2, ++MAIL_DIR/cur/32:2, ++MAIL_DIR/cur/31:2, ++MAIL_DIR/cur/30:2, ++MAIL_DIR/cur/29:2, ++MAIL_DIR/cur/28:2, ++MAIL_DIR/cur/27:2, ++MAIL_DIR/cur/26:2, ++MAIL_DIR/cur/25:2, ++MAIL_DIR/cur/24:2, ++MAIL_DIR/cur/23:2, ++MAIL_DIR/cur/22:2, ++MAIL_DIR/cur/21:2, ++MAIL_DIR/cur/19:2, ++MAIL_DIR/cur/18:2, ++MAIL_DIR/cur/20:2, ++MAIL_DIR/cur/17:2, ++MAIL_DIR/cur/16:2, ++MAIL_DIR/cur/15:2, ++MAIL_DIR/cur/14:2, ++MAIL_DIR/cur/13:2, ++MAIL_DIR/cur/12:2, ++MAIL_DIR/cur/11:2, ++MAIL_DIR/cur/10:2, ++MAIL_DIR/cur/09:2, ++MAIL_DIR/cur/08:2, ++MAIL_DIR/cur/06:2, ++MAIL_DIR/cur/05:2, ++MAIL_DIR/cur/04:2, ++MAIL_DIR/cur/03:2, ++MAIL_DIR/cur/07:2, ++MAIL_DIR/cur/02:2, ++MAIL_DIR/cur/01:2, ++EOF ++test_expect_equal_file OUTPUT EXPECTED ++ + test_begin_subtest "--output=files --format=json" + notmuch search --format=json --output=files '*' | sed -e "s,$MAIL_DIR,MAIL_DIR," >OUTPUT + cat <EXPECTED +@@ -298,6 +356,13 @@ cat <EXPECTED + EOF + test_expect_equal_file OUTPUT EXPECTED + ++test_begin_subtest "--output=files --format=json --duplicate=2" ++notmuch search --format=json --output=files --duplicate=2 '*' | sed -e "s,$MAIL_DIR,MAIL_DIR," >OUTPUT ++cat <EXPECTED ++["MAIL_DIR/cur/51:2,"] ++EOF ++test_expect_equal_file OUTPUT EXPECTED ++ + test_begin_subtest "--output=tags" + notmuch search --output=tags '*' >OUTPUT + cat <EXPECTED +-- +1.7.10.4 + -- 2.26.2