From: david Date: Sun, 5 Aug 2012 18:13:13 +0000 (+2100) Subject: [PATCH 3/3] test: add broken roundtrip test X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=8a5f0cba3575d4d0dd4d950709306241194c5746;p=notmuch-archives.git [PATCH 3/3] test: add broken roundtrip test --- diff --git a/3e/f265abf9f4d36fc5c69b0c8e10702475981d21 b/3e/f265abf9f4d36fc5c69b0c8e10702475981d21 new file mode 100644 index 000000000..43c24d6de --- /dev/null +++ b/3e/f265abf9f4d36fc5c69b0c8e10702475981d21 @@ -0,0 +1,84 @@ +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 87ADB431FC9 + for ; Sun, 5 Aug 2012 11:13:38 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: 0 +X-Spam-Level: +X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none] + 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 xpVO+ywy-2Rq for ; + Sun, 5 Aug 2012 11:13:38 -0700 (PDT) +Received: from tesseract.cs.unb.ca (tesseract.cs.unb.ca [131.202.240.238]) + (using TLSv1 with cipher AES256-SHA (256/256 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id EE6B9431FC2 + for ; Sun, 5 Aug 2012 11:13:37 -0700 (PDT) +Received: from fctnnbsc30w-156034089108.dhcp-dynamic.fibreop.nb.bellaliant.net + ([156.34.89.108] helo=zancas.localnet) + by tesseract.cs.unb.ca with esmtpsa + (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) + (envelope-from ) + id 1Sy5KV-0006XM-4I; Sun, 05 Aug 2012 15:13:35 -0300 +Received: from bremner by zancas.localnet with local (Exim 4.80) + (envelope-from ) + id 1Sy5KP-0005x9-LU; Sun, 05 Aug 2012 15:13:25 -0300 +From: david@tethera.net +To: notmuch@notmuchmail.org +Subject: [PATCH 3/3] test: add broken roundtrip test +Date: Sun, 5 Aug 2012 15:13:13 -0300 +Message-Id: <1344190393-22497-4-git-send-email-david@tethera.net> +X-Mailer: git-send-email 1.7.10.4 +In-Reply-To: <1344190393-22497-1-git-send-email-david@tethera.net> +References: <1344190393-22497-1-git-send-email-david@tethera.net> +X-Spam_bar: - +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: Sun, 05 Aug 2012 18:13:38 -0000 + +From: David Bremner + +The output of test_cmp is redirected because it is pretty horrible, +and tends to mess up terminals. When the test is no longer marked as +broken, this redirection should be removed. +--- + test/dump-restore | 9 +++++++++ + 1 file changed, 9 insertions(+) + +diff --git a/test/dump-restore b/test/dump-restore +index 439e998..7979ebf 100755 +--- a/test/dump-restore ++++ b/test/dump-restore +@@ -82,4 +82,13 @@ test_begin_subtest "dump outfile -- from:cworth" + notmuch dump dump-outfile-dash-inbox.actual -- from:cworth + test_expect_equal_file dump-cworth.expected dump-outfile-dash-inbox.actual + ++test_expect_success 'roundtripping random message-ids and tags' \ ++ 'test_subtest_known_broken && ++ ${TEST_DIRECTORY}/random-corpus --config-path=${NOTMUCH_CONFIG} && ++ notmuch dump > EXPECTED.$test_count && ++ notmuch tag -random-corpus tag:random-corpus && ++ notmuch restore < EXPECTED.$test_count 2>/dev/null && ++ notmuch dump > OUTPUT.$test_count && ++ test_cmp EXPECTED.$test_count OUTPUT.$test_count 1>/dev/null' ++ + test_done +-- +1.7.10.4 +