From 67cba04bc8a6fc13f83b57c55a91763029c33c93 Mon Sep 17 00:00:00 2001 From: Jani Nikula Date: Sun, 31 Mar 2013 12:46:02 +0300 Subject: [PATCH] [PATCH v3 5/6] test: notmuch count --batch and --input options --- 5f/b3b1a5740185cc46e91181f52070f60be3dbd3 | 132 ++++++++++++++++++++++ 1 file changed, 132 insertions(+) create mode 100644 5f/b3b1a5740185cc46e91181f52070f60be3dbd3 diff --git a/5f/b3b1a5740185cc46e91181f52070f60be3dbd3 b/5f/b3b1a5740185cc46e91181f52070f60be3dbd3 new file mode 100644 index 000000000..0104e1e9d --- /dev/null +++ b/5f/b3b1a5740185cc46e91181f52070f60be3dbd3 @@ -0,0 +1,132 @@ +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 7C5FA431FC3 + for ; Sun, 31 Mar 2013 02:46:29 -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 w9zWytTLSZsV for ; + Sun, 31 Mar 2013 02:46:28 -0700 (PDT) +Received: from mail-lb0-f169.google.com (mail-lb0-f169.google.com + [209.85.217.169]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id DB8A4429E30 + for ; Sun, 31 Mar 2013 02:46:21 -0700 (PDT) +Received: by mail-lb0-f169.google.com with SMTP id p11so1251861lbi.28 + for ; Sun, 31 Mar 2013 02:46:20 -0700 (PDT) +X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; + d=google.com; s=20120113; + h=x-received:from:to:cc:subject:date:message-id:x-mailer:in-reply-to + :references:in-reply-to:references:x-gm-message-state; + bh=iUkysQufjsRsiFiizusF6lYFGKXmYlhr58F+m8UjVsI=; + b=Q+jJWEyhUokhay14V2v2WqvuC5ZpCRCY10r6CzzWgzToqmyKRKjEpK5MB2lY8EQvLT + Mx8pD3ut4s6K3Cbb/AMfVFL5LwnV/bK1Rg9oBY3eVcNiObcoaAuCp9aVaoMZcyvGPIOW + ap8oIC3qY2XOCSuOa+M6EG8Hx7EeRafXkku+OEkZc07OO5Nzz3BGX5Fm+emsvvc4tdWz + DmlwutOMOcHaAifg+ZnvPreQ4BgJN5fzwkRNqSwZuLrSmQ70O4jYrq9eIaMENDqVHFhR + mbMFUrZmqH2Ltmy1i+98wCrtm57E8l/VfbCPEH0CYGTPKHwIefrQHnXj7fTbAxnb8wWk + nipw== +X-Received: by 10.112.145.8 with SMTP id sq8mr4016072lbb.55.1364723180477; + Sun, 31 Mar 2013 02:46:20 -0700 (PDT) +Received: from localhost (dsl-hkibrasgw4-50df51-27.dhcp.inet.fi. + [80.223.81.27]) + by mx.google.com with ESMTPS id nv3sm3709547lbb.15.2013.03.31.02.46.18 + (version=TLSv1.2 cipher=RC4-SHA bits=128/128); + Sun, 31 Mar 2013 02:46:19 -0700 (PDT) +From: Jani Nikula +To: notmuch@notmuchmail.org +Subject: [PATCH v3 5/6] test: notmuch count --batch and --input options +Date: Sun, 31 Mar 2013 12:46:02 +0300 +Message-Id: + +X-Mailer: git-send-email 1.7.10.4 +In-Reply-To: +References: +In-Reply-To: +References: +X-Gm-Message-State: + ALoCoQli9u8YvdLglsjlkWtcIPikEYJcfENL4ULw5bOTPyJFfOUBPh/5OlDEQ1qoDatxdtzHUr5p +Cc: Tomi Ollila +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, 31 Mar 2013 09:46:30 -0000 + +--- + test/count | 46 ++++++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 46 insertions(+) + +diff --git a/test/count b/test/count +index 879b114..05713fd 100755 +--- a/test/count ++++ b/test/count +@@ -38,4 +38,50 @@ test_expect_equal \ + "0" \ + "`notmuch count --output=threads from:cworth and not from:cworth`" + ++test_begin_subtest "message count is the default for batch count" ++notmuch count --batch >OUTPUT <EXPECTED ++notmuch count --output=messages from:cworth >>EXPECTED ++test_expect_equal_file EXPECTED OUTPUT ++ ++test_begin_subtest "batch message count" ++notmuch count --batch --output=messages >OUTPUT <EXPECTED ++notmuch count --output=messages >>EXPECTED ++notmuch count --output=messages tag:inbox >>EXPECTED ++test_expect_equal_file EXPECTED OUTPUT ++ ++test_begin_subtest "batch thread count" ++notmuch count --batch --output=threads >OUTPUT <EXPECTED ++notmuch count --output=threads from:cworth >>EXPECTED ++notmuch count --output=threads from:cworth and not from:cworth >>EXPECTED ++notmuch count --output=threads foo >>EXPECTED ++test_expect_equal_file EXPECTED OUTPUT ++ ++test_begin_subtest "batch message count with input file" ++cat >INPUT <OUTPUT ++notmuch count --output=messages from:cworth >EXPECTED ++notmuch count --output=messages >>EXPECTED ++notmuch count --output=messages tag:inbox >>EXPECTED ++test_expect_equal_file EXPECTED OUTPUT ++ ++ + test_done +-- +1.7.10.4 + -- 2.26.2