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 415C3429E58 for ; Sat, 17 Aug 2013 05:11:47 -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 iSl3OUBVQmu3 for ; Sat, 17 Aug 2013 05:11:42 -0700 (PDT) Received: from mail-bk0-f43.google.com (mail-bk0-f43.google.com [209.85.214.43]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id D7836429E59 for ; Sat, 17 Aug 2013 05:11:37 -0700 (PDT) Received: by mail-bk0-f43.google.com with SMTP id mz13so907390bkb.2 for ; Sat, 17 Aug 2013 05:11:36 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=vUOadL1+0/RpoLGtNCyP7EhDDb2j0Ct+vSFU1J+DCvM=; b=KkVo4uOn+EwxiA1AEmZ/7kSjf7mDkuWxd/Q+Wbx3tuzv9babeByrCiBrk5Bxc+/Jqs ssMA3p7kCmBK0PKYXlUbRITw7pgsCHGyFOhHYO/1TIWMku9As4YlLwdKONS82jq6aeWx xA1yMXCJOifZkHo9uPTzQUdmce316BVuK+thMgo0vKGEvYFuId8/Z46oZBbStc1RR8U/ 23HCP5a6F9QM9HNtGYHdv2+YJPBqLiuaeLBNprAr0MYCt/hJSmRmdlYv3Pd/e2pUDOdo ZsFIU/Ux/TIeJY5+68izqYSHEoE9jHlq7JvBiHPlk26KNr9JT91wtAznlrClqB4CYcCx dTUQ== X-Gm-Message-State: ALoCoQnsUa+V5xGlgdEZb8CHhDVYjIqPVTL+G69s4+DzUBp7oVw5fv9GjxR0f4+U5tr+OsT5nLb/ X-Received: by 10.204.224.142 with SMTP id io14mr1957bkb.27.1376741496524; Sat, 17 Aug 2013 05:11:36 -0700 (PDT) Received: from localhost (dsl-hkibrasgw2-58c36f-91.dhcp.inet.fi. [88.195.111.91]) by mx.google.com with ESMTPSA id pn6sm249358bkb.14.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Sat, 17 Aug 2013 05:11:35 -0700 (PDT) From: Jani Nikula To: notmuch@notmuchmail.org Subject: [PATCH v3 2/8] test: test notmuch search --duplicate=N Date: Sat, 17 Aug 2013 15:11:27 +0300 Message-Id: <88dc38a1e8c4c15bfb84586bdef9e6b60fc4c290.1376741447.git.jani@nikula.org> X-Mailer: git-send-email 1.7.10.4 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, 17 Aug 2013 12:11:47 -0000 Add test for notmuch search --duplicate=N option. --- 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