From: David Bremner Date: Sat, 5 Apr 2014 15:43:53 +0000 (+2100) Subject: [Patch v7 3/6] test: restore with missing final newline X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=3075d42a3eda4de820c9bc9354866182bb106d31;p=notmuch-archives.git [Patch v7 3/6] test: restore with missing final newline --- diff --git a/61/f36d4cbb208936e4664358a7d692eb56741543 b/61/f36d4cbb208936e4664358a7d692eb56741543 new file mode 100644 index 000000000..2e87f88c8 --- /dev/null +++ b/61/f36d4cbb208936e4664358a7d692eb56741543 @@ -0,0 +1,77 @@ +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 75437431FB6 + for ; Sat, 5 Apr 2014 08:45:36 -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 HWaufJVQDblp for ; + Sat, 5 Apr 2014 08:45:32 -0700 (PDT) +Received: from mx.xen14.node3324.gplhost.com (gitolite.debian.net + [87.98.215.224]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id 1682C431FC2 + for ; Sat, 5 Apr 2014 08:45:32 -0700 (PDT) +Received: from remotemail by mx.xen14.node3324.gplhost.com with local (Exim + 4.72) (envelope-from ) + id 1WWSlx-00082T-4f; Sat, 05 Apr 2014 15:44:45 +0000 +Received: (nullmailer pid 10916 invoked by uid 1000); Sat, 05 Apr 2014 + 15:43:59 -0000 +From: David Bremner +To: notmuch@notmuchmail.org +Subject: [Patch v7 3/6] test: restore with missing final newline +Date: Sat, 5 Apr 2014 12:43:53 -0300 +Message-Id: <1396712636-10640-4-git-send-email-david@tethera.net> +X-Mailer: git-send-email 1.9.0 +In-Reply-To: <1396712636-10640-1-git-send-email-david@tethera.net> +References: <1396712636-10640-1-git-send-email-david@tethera.net> +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: Sat, 05 Apr 2014 15:45:36 -0000 + +Recent proposed patches for gzipped input had a bug with handling +missing newlines that was not caught by the current test suite +--- + test/T240-dump-restore.sh | 9 +++++++++ + 1 file changed, 9 insertions(+) + +diff --git a/test/T240-dump-restore.sh b/test/T240-dump-restore.sh +index d79aca8..b6d8602 100755 +--- a/test/T240-dump-restore.sh ++++ b/test/T240-dump-restore.sh +@@ -110,6 +110,15 @@ 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 "format=batch-tag, missing newline" ++printf "+a_tag_without_newline -- id:20091117232137.GA7669@griffis1.net" > IN ++notmuch restore --accumulate < IN ++notmuch dump id:20091117232137.GA7669@griffis1.net > OUT ++cat < EXPECTED +++a_tag_without_newline +inbox +unread -- id:20091117232137.GA7669@griffis1.net ++EOF ++test_expect_equal_file EXPECTED OUT ++ + test_begin_subtest "format=batch-tag, # round-trip" + notmuch dump --format=sup | sort > EXPECTED.$test_count + notmuch dump --format=batch-tag | notmuch restore --format=batch-tag +-- +1.9.0 +