From: Daniel Schoepe Date: Tue, 11 Aug 2015 07:46:38 +0000 (+0200) Subject: [PATCH 2/2] test: Tests for combining --batch and --remove-all X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=0d372ea5c906fdbea3419b787d1088e7025cfe8c;p=notmuch-archives.git [PATCH 2/2] test: Tests for combining --batch and --remove-all --- diff --git a/c5/f6db91fa045c389e2682548f68c43dac4d44b1 b/c5/f6db91fa045c389e2682548f68c43dac4d44b1 new file mode 100644 index 000000000..3c2901d07 --- /dev/null +++ b/c5/f6db91fa045c389e2682548f68c43dac4d44b1 @@ -0,0 +1,123 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by arlo.cworth.org (Postfix) with ESMTP id BC9C86DE02D6 + for ; Tue, 11 Aug 2015 00:47:31 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at cworth.org +X-Spam-Flag: NO +X-Spam-Score: -0.11 +X-Spam-Level: +X-Spam-Status: No, score=-0.11 tagged_above=-999 required=5 tests=[AWL=0.097, + DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, + RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, + RCVD_IN_MSPIKE_WL=-0.01, RCVD_IN_SORBS_WEB=0.614, SPF_PASS=-0.001] + autolearn=disabled +Received: from arlo.cworth.org ([127.0.0.1]) + by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id p0FyRYjmPQcA for ; + Tue, 11 Aug 2015 00:47:29 -0700 (PDT) +Received: from mail-wi0-f180.google.com (mail-wi0-f180.google.com + [209.85.212.180]) + by arlo.cworth.org (Postfix) with ESMTPS id 7D02C6DE179D + for ; Tue, 11 Aug 2015 00:47:27 -0700 (PDT) +Received: by wicja10 with SMTP id ja10so64505257wic.1 + for ; Tue, 11 Aug 2015 00:47:26 -0700 (PDT) +DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=schoepe.org; s=google; + h=from:to:cc:subject:date:message-id:in-reply-to:references; + bh=Xzk1weZX2lYeB3GjWvB/iEeHJ4XLvDqXaFlX47rv/ro=; + b=hE4c/aeK+uB3E9i0rWYS94NrRKPy1YRGApdWWrNZftsdT6hBzIGIoLxHlodhKI8x3P + QbkyB9wMzAVBpxlhuyI+ZRazJzY1pxgkgx5Tlyb2yLroqSwPgdLIc5bbzJYC5HYktiDt + S6kGG3IwYt7JboBMgpCo5s9lbnGIeqI+etRQc= +X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; + d=1e100.net; s=20130820; + h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to + :references; + bh=Xzk1weZX2lYeB3GjWvB/iEeHJ4XLvDqXaFlX47rv/ro=; + b=XrWUr1vPY0+I3tm5uzNZ5f+RzurrVH8j7i05fyVWMu8QteBeBDgRD8CL904AUyrpnO + 7wYPuQbpl8jwciKVkHvzl1MVkgL1qHB5cdfqyjF3Pf7/DcaeECtbOXbB8gIFJ7UWvf3Q + mLlW/VkERn0jfpB76z0o/lstLezzNvG/czVvG2DAxbrum3iurGfKG4HmdoXX+WxxXEqE + /LG0rUrqBVTnf0qldrJTlGlIVkxLbA5mJvsrUOtThr+iqo8V9IAfzxSVug/eDNF/31l2 + VsS9gFjPBCm/yWpbPa2R3dYVs/RxOr4K7jfhSj556jrN6k7skTUEwU0RX+qzZxW03ear + 7fiw== +X-Gm-Message-State: + ALoCoQm6WrCfEsRMyrNnV1IE8GCbbofwLCd1rL/PpkfmkdBW+8bOR74DIGTnDjff5RP1kNFM9EcK +X-Received: by 10.180.75.48 with SMTP id z16mr33577937wiv.2.1439279245888; + Tue, 11 Aug 2015 00:47:25 -0700 (PDT) +Received: from localhost (ip-80-226-24-7.vodafone-net.de. [80.226.24.7]) + by smtp.gmail.com with ESMTPSA id w8sm2067732wiy.10.2015.08.11.00.47.23 + (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); + Tue, 11 Aug 2015 00:47:25 -0700 (PDT) +From: Daniel Schoepe +To: notmuch@notmuchmail.org +Subject: [PATCH 2/2] test: Tests for combining --batch and --remove-all +Date: Tue, 11 Aug 2015 09:46:38 +0200 +Message-Id: <1439279198-21330-3-git-send-email-daniel@schoepe.org> +X-Mailer: git-send-email 2.5.0 +In-Reply-To: <1439279198-21330-1-git-send-email-daniel@schoepe.org> +References: <1439279198-21330-1-git-send-email-daniel@schoepe.org> +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.18 +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, 11 Aug 2015 07:47:31 -0000 + +This patch adds some tests for combining --remove-all with --batch or +--input when calling notmuch-tag. +--- + test/T150-tagging.sh | 24 ++++++++++++++++++++++++ + 1 file changed, 24 insertions(+) + +diff --git a/test/T150-tagging.sh b/test/T150-tagging.sh +index 821d393..19539dd 100755 +--- a/test/T150-tagging.sh ++++ b/test/T150-tagging.sh +@@ -38,6 +38,16 @@ test_expect_equal "$output" "\ + thread:XXX 2001-01-05 [1/1] Notmuch Test Suite; One () + thread:XXX 2001-01-05 [1/1] Notmuch Test Suite; Two (tag5 tag6 unread)" + ++test_begin_subtest "Remove all with batch" ++notmuch tag --remove-all --batch < OUTPUT + notmuch restore --format=batch-tag < backup.tags + test_expect_equal_file batch.expected OUTPUT + ++test_begin_subtest "--batch --input --remove-all" ++notmuch dump --format=batch-tag > backup.tags ++notmuch tag +foo +bar -- One ++notmuch tag +tag7 -- Two ++notmuch tag --batch --input=batch.in --remove-all ++notmuch search \* | notmuch_search_sanitize > OUTPUT ++notmuch restore --format=batch-tag < backup.tags ++cat > batch_removeall.expected < EXPECTED + notmuch tag --batch <