From: Jani Nikula Date: Fri, 7 Dec 2012 22:26:09 +0000 (+0200) Subject: Re: [Patch v3b 2/9] test: add sanity check for dump --format=batch-tag. X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=a0f12a1122ef5dc50703c1c446eb07a772f48602;p=notmuch-archives.git Re: [Patch v3b 2/9] test: add sanity check for dump --format=batch-tag. --- diff --git a/58/84ed806c2c75e835e8256003864f06389e0189 b/58/84ed806c2c75e835e8256003864f06389e0189 new file mode 100644 index 000000000..8e9930862 --- /dev/null +++ b/58/84ed806c2c75e835e8256003864f06389e0189 @@ -0,0 +1,113 @@ +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 A79C4431FB6 + for ; Fri, 7 Dec 2012 14:26:14 -0800 (PST) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +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 fMqXyqeI9vwW for ; + Fri, 7 Dec 2012 14:26:14 -0800 (PST) +Received: from mail-la0-f53.google.com (mail-la0-f53.google.com + [209.85.215.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id DCC4E431FAE + for ; Fri, 7 Dec 2012 14:26:13 -0800 (PST) +Received: by mail-la0-f53.google.com with SMTP id w12so738715lag.26 + for ; Fri, 07 Dec 2012 14:26:12 -0800 (PST) +X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; + d=google.com; s=20120113; + h=from:to:cc:subject:in-reply-to:references:user-agent:date + :message-id:mime-version:content-type:x-gm-message-state; + bh=50uuJF145V1l80XGNGcfXwo/OCc9vbp2nVdtbFAGR1s=; + b=cumM/cVKHxvo46W+XrMcPj8x97QlyMhTqmVF9SyZTH+FYawp/25pui2/ZXDLQJDjZ2 + qwEfRqTpWODYnH879whchIUV4JxeIvIVqI/nfYvwRWDEYEBaBcAgKQUzJeT9tys1xbgR + ehPvVTKruQsol+yn8Fn3c4mYGavlLSK65UyzHbFfAeziyOJ3gulJO1WKIrnJHWVt7tQF + FbJZ+RPZ8eckAHQpnBQbn8Ms6JLzxvhd8GJB8aVqruB76ZEMkkYWSWJ9QY5PWKoNv7iX + JdM1sBufI5/Zazp37OxQdYqjZ8Gx4DK4I1ykip7Q5OVIv0eDWoOstICps27hOTFNaSs7 + vxHg== +Received: by 10.152.145.202 with SMTP id sw10mr6878067lab.22.1354919172170; + Fri, 07 Dec 2012 14:26:12 -0800 (PST) +Received: from localhost (dsl-hkibrasgw4-fe51df00-27.dhcp.inet.fi. + [80.223.81.27]) + by mx.google.com with ESMTPS id ts2sm5082347lab.10.2012.12.07.14.26.10 + (version=SSLv3 cipher=OTHER); Fri, 07 Dec 2012 14:26:11 -0800 (PST) +From: Jani Nikula +To: david@tethera.net, notmuch@notmuchmail.org +Subject: Re: [Patch v3b 2/9] test: add sanity check for dump + --format=batch-tag. +In-Reply-To: <1354843607-17980-3-git-send-email-david@tethera.net> +References: <1354843607-17980-1-git-send-email-david@tethera.net> + <1354843607-17980-3-git-send-email-david@tethera.net> +User-Agent: Notmuch/0.14+138~g7041c56 (http://notmuchmail.org) Emacs/23.4.1 + (i686-pc-linux-gnu) +Date: Sat, 08 Dec 2012 00:26:09 +0200 +Message-ID: <87zk1pxzwe.fsf@nikula.org> +MIME-Version: 1.0 +Content-Type: text/plain; charset=us-ascii +X-Gm-Message-State: + ALoCoQng0AUUaHcyEugWd7d85sFNqV0n6yp6ExU3Ym9Vu7FZaEXHiEkj1H3nAUNsBnZwQHR3Do+w +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: Fri, 07 Dec 2012 22:26:14 -0000 + + +LGTM. + +On Fri, 07 Dec 2012, david@tethera.net wrote: +> From: David Bremner +> +> It's important this does not rely on restore, since it hasn't been +> written yet. +> --- +> test/dump-restore | 13 +++++++++++++ +> 1 file changed, 13 insertions(+) +> +> diff --git a/test/dump-restore b/test/dump-restore +> index bf31266..b4c807f 100755 +> --- a/test/dump-restore +> +++ b/test/dump-restore +> @@ -85,6 +85,19 @@ test_begin_subtest "dump --output=outfile -- from:cworth" +> notmuch dump --output=dump-outfile-dash-inbox.actual -- from:cworth +> test_expect_equal_file dump-cworth.expected dump-outfile-dash-inbox.actual +> +> +test_begin_subtest "Check for a safe set of message-ids" +> +notmuch search --output=messages from:cworth | sed s/^id:// > EXPECTED +> +notmuch search --output=messages from:cworth | sed s/^id:// |\ +> + $TEST_DIRECTORY/hex-xcode --direction=encode > OUTPUT +> +test_expect_equal_file OUTPUT EXPECTED +> + +> +test_begin_subtest "format=batch-tag, dump sanity check." +> +notmuch dump --format=sup from:cworth | cut -f1 -d' ' | \ +> + sort > EXPECTED.$test_count +> +notmuch dump --format=batch-tag from:cworth | sed 's/^.*-- id://' | \ +> + sort > OUTPUT.$test_count +> +test_expect_equal_file EXPECTED.$test_count OUTPUT.$test_count +> + +> test_begin_subtest 'roundtripping random message-ids and tags' +> test_subtest_known_broken +> ${TEST_DIRECTORY}/random-corpus --config-path=${NOTMUCH_CONFIG} \ +> -- +> 1.7.10.4 +> +> _______________________________________________ +> notmuch mailing list +> notmuch@notmuchmail.org +> http://notmuchmail.org/mailman/listinfo/notmuch