From: Daniel Schoepe Date: Tue, 11 Aug 2015 08:02:16 +0000 (+0200) Subject: [PATCH] test: Tests for combining --batch and --remove-all X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=a06dde717243603b0cb12d929ad7e37b8474484a;p=notmuch-archives.git [PATCH] test: Tests for combining --batch and --remove-all --- diff --git a/a3/16458f47f5a57b743fc02845cd024604d2c011 b/a3/16458f47f5a57b743fc02845cd024604d2c011 new file mode 100644 index 000000000..7b8ff4150 --- /dev/null +++ b/a3/16458f47f5a57b743fc02845cd024604d2c011 @@ -0,0 +1,125 @@ +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 131DF6DE0B2F + for ; Tue, 11 Aug 2015 01:03:12 -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 14Vrfa4YKukE for ; + Tue, 11 Aug 2015 01:03:09 -0700 (PDT) +Received: from mail-wi0-f179.google.com (mail-wi0-f179.google.com + [209.85.212.179]) + by arlo.cworth.org (Postfix) with ESMTPS id 0CB776DE0AC2 + for ; Tue, 11 Aug 2015 01:03:09 -0700 (PDT) +Received: by wibhh20 with SMTP id hh20so183144776wib.0 + for ; Tue, 11 Aug 2015 01:03:07 -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=FroRYUll4p5Qp9tEv81+wtAX05m5InV1TnxITHVLnW0=; + b=K17SfHqKMRlQ4pUOsKC+vQusvTCf8X1p8J92fhTEE+rIEme7zuoMXIs40jZr7NkfvQ + tYOHJKTPO2wMOHoYbomhIcqGpzbvzs/COwt27N3FywuTbN6T60aRHCRA5QbWpdzOisWE + zMaRrphyRV54YqcSc88XWYcUvXKxK1WZ+BPL0= +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=FroRYUll4p5Qp9tEv81+wtAX05m5InV1TnxITHVLnW0=; + b=crHlgPrWI4ihm7nI5uaM3hRgEaE9HAtp42vDEcJzoZYztF3RnJ5FcG6FSEZxujGXC9 + zqqSjNLwM73a5xWzLi2Hd8iOtuCC1axWSV3hZIqsGpf1w8aCCKsr5aDGCGE9ONyxiGMB + f3bRZnxNH4a5WyU/Kh/017b0XiPJYYdL3I4uXWbUjvtey1S6QMX9Mj0xEmudOnde4kAo + inNgQw9YGHezuJw8Qp+HFkNmqLUXtWkBi+0idW9H7M615m1fXkabm4WmxG4uIrzBlY2n + PN8be1hre8is/uxz8ZfaAkKGm5QUDiIJwYcBY+1EXAo3dtP06zLwCC19gOruhn0Kzqlu + UQrQ== +X-Gm-Message-State: + ALoCoQldnY9HeBJoKciglmljw9lxHGVgkEmxQ/Az6WMchjNPdtpdpP2/TNxAbVPbCpaA7yIDNU+h +X-Received: by 10.180.90.209 with SMTP id by17mr34426561wib.60.1439280187581; + Tue, 11 Aug 2015 01:03:07 -0700 (PDT) +Received: from localhost (ip-80-226-24-7.vodafone-net.de. [80.226.24.7]) + by smtp.gmail.com with ESMTPSA id ny7sm17629936wic.11.2015.08.11.01.03.04 + (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); + Tue, 11 Aug 2015 01:03:06 -0700 (PDT) +From: Daniel Schoepe +To: notmuch@notmuchmail.org +Subject: [PATCH] test: Tests for combining --batch and --remove-all +Date: Tue, 11 Aug 2015 10:02:16 +0200 +Message-Id: <1439280136-25465-2-git-send-email-daniel@schoepe.org> +X-Mailer: git-send-email 2.5.0 +In-Reply-To: <1439280136-25465-1-git-send-email-daniel@schoepe.org> +References: + <1439280136-25465-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 08:03:12 -0000 + +This patch adds some tests for combining --remove-all with --batch or +--input when calling notmuch-tag. +--- + test/T150-tagging.sh | 25 +++++++++++++++++++++++++ + 1 file changed, 25 insertions(+) + +diff --git a/test/T150-tagging.sh b/test/T150-tagging.sh +index 821d393..8adcabc 100755 +--- a/test/T150-tagging.sh ++++ b/test/T150-tagging.sh +@@ -38,6 +38,17 @@ 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 +tag1 One ++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 <