From: Jani Nikula Date: Sat, 9 Mar 2013 15:12:25 +0000 (+0200) Subject: [PATCH v2 5/6] test: notmuch count --batch and --input options X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=975d66fda1612ed09dacf62baf7073b82ceccec7;p=notmuch-archives.git [PATCH v2 5/6] test: notmuch count --batch and --input options --- diff --git a/f3/b29705156bc02f1057444868b86879520a7532 b/f3/b29705156bc02f1057444868b86879520a7532 new file mode 100644 index 000000000..42c7d23c5 --- /dev/null +++ b/f3/b29705156bc02f1057444868b86879520a7532 @@ -0,0 +1,131 @@ +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 7C1EA431FD7 + for ; Sat, 9 Mar 2013 07:13:05 -0800 (PST) +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 EjE0f9c2yujv for ; + Sat, 9 Mar 2013 07:13:04 -0800 (PST) +Received: from mail-la0-f43.google.com (mail-la0-f43.google.com + [209.85.215.43]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id 031A1431FAF + for ; Sat, 9 Mar 2013 07:12:52 -0800 (PST) +Received: by mail-la0-f43.google.com with SMTP id ek20so2623871lab.30 + for ; Sat, 09 Mar 2013 07:12:51 -0800 (PST) +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=HohhV9W/PxY1yeCqxMB49EJUxPb8nr3bv4XCn7haiHVAehc+WD/N7SxgWtK97SVi7U + EwGlhLWmS0Fo+pQ6tF2TqtQQGTMA7dss4rgo1OjxC6NupeRml4zYQbGPLTEIrJGLj8ph + eZJ/HEVB0E0/YZsbgwxrWtJZgCSv4qd1SzGOWgxMIPKyMqUK3xtOmOTrGHTZF4by2Aau + whMWilCRhm63Ce7heAVJ4hWGHEoQ/IAKulsQokNL95boErDxhiAhvdBRy8/QGqNXksBr + 03azgjw69OG3YNKWoceb3KY0LgHX3gH7T85nAGCjp1rP/jditPRtXaphs7LI0VeArsnS + UH5w== +X-Received: by 10.152.110.167 with SMTP id ib7mr5242562lab.22.1362841971491; + Sat, 09 Mar 2013 07:12:51 -0800 (PST) +Received: from localhost (dsl-hkibrasgw4-50df51-27.dhcp.inet.fi. + [80.223.81.27]) + by mx.google.com with ESMTPS id xw14sm4275762lab.6.2013.03.09.07.12.49 + (version=TLSv1.2 cipher=RC4-SHA bits=128/128); + Sat, 09 Mar 2013 07:12:50 -0800 (PST) +From: Jani Nikula +To: notmuch@notmuchmail.org +Subject: [PATCH v2 5/6] test: notmuch count --batch and --input options +Date: Sat, 9 Mar 2013 17:12:25 +0200 +Message-Id: + <78b80f73ba645bf2e5b0f4569edf22ffd3a5d4c4.1362841844.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: + ALoCoQk0LwnhTk2aigb8FMBW20ViIUrvn0dfsINmrGAtic4ogeD7OdeoLyUdzmwwbVrPI+KjEh70 +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, 09 Mar 2013 15:13:06 -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 +