From: david Date: Mon, 10 Oct 2011 13:49:16 +0000 (+2100) Subject: [PATCH 1/6] test: update dump-restore to use redirection instead of filename args X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=66f869175df4cbcbfc718168b02a1253d3dcb559;p=notmuch-archives.git [PATCH 1/6] test: update dump-restore to use redirection instead of filename args --- diff --git a/4a/4b2322bcc08ea6cba8bb90995f8986e071d1c1 b/4a/4b2322bcc08ea6cba8bb90995f8986e071d1c1 new file mode 100644 index 000000000..8be49f5dc --- /dev/null +++ b/4a/4b2322bcc08ea6cba8bb90995f8986e071d1c1 @@ -0,0 +1,94 @@ +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 B5F89429E35 + for ; Mon, 10 Oct 2011 06:49:50 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: -2.3 +X-Spam-Level: +X-Spam-Status: No, score=-2.3 tagged_above=-999 required=5 + tests=[RCVD_IN_DNSWL_MED=-2.3] 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 8F4rFEutWMUn for ; + Mon, 10 Oct 2011 06:49:49 -0700 (PDT) +Received: from tempo.its.unb.ca (tempo.its.unb.ca [131.202.1.21]) + (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id 2AC26429E32 + for ; Mon, 10 Oct 2011 06:49:47 -0700 (PDT) +Received: from zancas.localnet + (fctnnbsc36w-156034064058.pppoe-dynamic.High-Speed.nb.bellaliant.net + [156.34.64.58]) (authenticated bits=0) + by tempo.its.unb.ca (8.13.8/8.13.8) with ESMTP id p9ADngZ8010802 + (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NO); + Mon, 10 Oct 2011 10:49:43 -0300 +Received: from bremner by zancas.localnet with local (Exim 4.76) + (envelope-from ) + id 1RDGEg-0006fl-Dt; Mon, 10 Oct 2011 10:49:42 -0300 +From: david@tethera.net +To: notmuch@notmuchmail.org +Subject: [PATCH 1/6] test: update dump-restore to use redirection instead of + filename args +Date: Mon, 10 Oct 2011 10:49:16 -0300 +Message-Id: <1318254561-25386-2-git-send-email-david@tethera.net> +X-Mailer: git-send-email 1.7.6.3 +In-Reply-To: <1318254561-25386-1-git-send-email-david@tethera.net> +References: <8739f2qhla.fsf@zancas.localnet> + <1318254561-25386-1-git-send-email-david@tethera.net> +Cc: David Bremner +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: Mon, 10 Oct 2011 13:49:51 -0000 + +From: David Bremner + +The idea here is that we want to deprecate the use of arguments to +dump and restore to specify paths, since in particular we want to use +the non-option arguments to dump to form a query. +--- + test/dump-restore | 10 +++++----- + 1 files changed, 5 insertions(+), 5 deletions(-) + +diff --git a/test/dump-restore b/test/dump-restore +index a4de370..96c4f19 100755 +--- a/test/dump-restore ++++ b/test/dump-restore +@@ -6,17 +6,17 @@ add_email_corpus + + test_expect_success "Dumping all tags" "generate_message && + notmuch new && +-notmuch dump dump.expected" ++notmuch dump > dump.expected" + + test_begin_subtest "Clearing all tags" + sed -e "s/(\([^(]*\))$/()/" < dump.expected > clear.expected +-notmuch restore clear.expected +-notmuch dump clear.actual ++notmuch restore < clear.expected ++notmuch dump > clear.actual + test_expect_equal "$(< clear.actual)" "$(< clear.expected)" + + test_begin_subtest "Restoring original tags" +-notmuch restore dump.expected +-notmuch dump dump.actual ++notmuch restore < dump.expected ++notmuch dump > dump.actual + test_expect_equal "$(< dump.actual)" "$(< dump.expected)" + + test_expect_success "Restore with nothing to do" "notmuch restore dump.expected" +-- +1.7.6.3 +