From faf20ead25dbf3e2276460dbf7f923ca1ea6b9ca Mon Sep 17 00:00:00 2001 From: Jani Nikula Date: Tue, 15 Jan 2013 23:54:47 +0200 Subject: [PATCH] [PATCH 5/5] test: notmuch count --batch and --input options --- 4a/aee13b3f77947fc89e932bc62938c011456233 | 131 ++++++++++++++++++++++ 1 file changed, 131 insertions(+) create mode 100644 4a/aee13b3f77947fc89e932bc62938c011456233 diff --git a/4a/aee13b3f77947fc89e932bc62938c011456233 b/4a/aee13b3f77947fc89e932bc62938c011456233 new file mode 100644 index 000000000..ca3158b35 --- /dev/null +++ b/4a/aee13b3f77947fc89e932bc62938c011456233 @@ -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 D817E431FD7 + for ; Tue, 15 Jan 2013 13:55:14 -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 qRusItmYEt5X for ; + Tue, 15 Jan 2013 13:55:14 -0800 (PST) +Received: from mail-lb0-f182.google.com (mail-lb0-f182.google.com + [209.85.217.182]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id B1C46431FBD + for ; Tue, 15 Jan 2013 13:55:06 -0800 (PST) +Received: by mail-lb0-f182.google.com with SMTP id go10so535810lbb.27 + for ; Tue, 15 Jan 2013 13:55:05 -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=n8QFdPCBrC9vHPxR7a4/ZPHFLHVmTdVwwaSjtUx/OooDyFx4uEzNB/YgChI49xrL7Q + QFk5gEgXlAjwBgTJ0GCDT8mjYyJvD7Cw2EIcKku8cz+mo3tPMjHrpdRhshHyLZyvLP4S + /vji+OeJFkLxW1KZqrLmbeysqfSblR8xdpngHl0ltKO7+jyPCKW6m87kfSCOTIih6mW8 + wtdS60GhPsjQWsZaoyANz+Uk5MifFpKT7J6Hdy9Ba9Mbs17HowuOp/7K2B/pKucMiRpl + cDuWt7UXwJ9F8T4V8LCgS5MH4AUjCjnZv+Vj03Arf9ovovbnzZPlDI3TwUdhSohoz7I4 + bg0g== +X-Received: by 10.152.134.167 with SMTP id pl7mr39428365lab.36.1358286905204; + Tue, 15 Jan 2013 13:55:05 -0800 (PST) +Received: from localhost (dsl-hkibrasgw4-50df51-27.dhcp.inet.fi. + [80.223.81.27]) + by mx.google.com with ESMTPS id ee5sm7274565lbb.14.2013.01.15.13.55.03 + (version=TLSv1.2 cipher=RC4-SHA bits=128/128); + Tue, 15 Jan 2013 13:55:04 -0800 (PST) +From: Jani Nikula +To: notmuch@notmuchmail.org +Subject: [PATCH 5/5] test: notmuch count --batch and --input options +Date: Tue, 15 Jan 2013 23:54:47 +0200 +Message-Id: + <111869c40ddc7c361fd3bac3ec3d04d428e687e9.1358273133.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: + ALoCoQnJEZR5Sd3V6gBUCTSo6PwI3FlorAKIX3twrRcUaaEPpdiMgIzXx9XPz7yPwFf+GsBLsKlD +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: Tue, 15 Jan 2013 21:55:15 -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