From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 8D1C7429E42 for ; Mon, 10 Oct 2011 06:49:52 -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 h52qAZpV9T1S for ; Mon, 10 Oct 2011 06:49:51 -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 00C71429E32 for ; Mon, 10 Oct 2011 06:49:50 -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 p9ADnlo3010807 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NO); Mon, 10 Oct 2011 10:49:48 -0300 Received: from bremner by zancas.localnet with local (Exim 4.76) (envelope-from ) id 1RDGEl-0006fo-C3; Mon, 10 Oct 2011 10:49:47 -0300 From: david@tethera.net To: notmuch@notmuchmail.org Subject: [PATCH 2/6] test: add tests for command line arguments to notmuch-dump Date: Mon, 10 Oct 2011 10:49:17 -0300 Message-Id: <1318254561-25386-3-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:52 -0000 From: David Bremner The plan is to add the possibility of search terms after the file name, and the use of -- to stop looking for an output file name. --- test/dump-restore | 28 ++++++++++++++++++++++++++++ 1 files changed, 28 insertions(+), 0 deletions(-) diff --git a/test/dump-restore b/test/dump-restore index 96c4f19..699337c 100755 --- a/test/dump-restore +++ b/test/dump-restore @@ -8,6 +8,34 @@ test_expect_success "Dumping all tags" "generate_message && notmuch new && notmuch dump > dump.expected" +test_begin_subtest "dump outfile" +notmuch dump dump-outfile.actual +test_expect_equal_file dump.expected dump-outfile.actual + +test_begin_subtest "dump outfile --" +notmuch dump dump-1-arg-dash.actual +test_expect_equal_file dump.expected dump-1-arg-dash.actual + +# Note, we assume all messages from cworth have a message-id +# containing cworth.org + +grep cworth\.org dump.expected > dump-cworth.expected + +test_begin_subtest "dump -- from:cworth" +test_subtest_known_broken +notmuch dump -- from:cworth > dump-dash-cworth.actual +test_expect_equal_file dump-cworth.expected dump-dash-cworth.actual + +test_begin_subtest "dump outfile from:cworth" +test_subtest_known_broken +notmuch dump dump-outfile-cworth.actual from:cworth +test_expect_equal_file dump-cworth.expected dump-outfile-cworth.actual + +test_begin_subtest "dump outfile -- from:cworth" +test_subtest_known_broken +notmuch dump dump-outfile-dash-inbox.actual -- from:cworth +test_expect_equal_file dump-cworth.expected dump-outfile-dash-inbox.actual + test_begin_subtest "Clearing all tags" sed -e "s/(\([^(]*\))$/()/" < dump.expected > clear.expected notmuch restore < clear.expected -- 1.7.6.3