From e21a9e15bdb25c51cf3088a5b5b64110582995a1 Mon Sep 17 00:00:00 2001 From: David Bremner Date: Sun, 8 Dec 2013 23:52:23 +0800 Subject: [PATCH] [PATCH 1/4] test: pass expected output through json_sanitize in 2 places --- d2/166b12448719f6dda4e90e3a62c3c4d831f2a7 | 97 +++++++++++++++++++++++ 1 file changed, 97 insertions(+) create mode 100644 d2/166b12448719f6dda4e90e3a62c3c4d831f2a7 diff --git a/d2/166b12448719f6dda4e90e3a62c3c4d831f2a7 b/d2/166b12448719f6dda4e90e3a62c3c4d831f2a7 new file mode 100644 index 000000000..c61fd481b --- /dev/null +++ b/d2/166b12448719f6dda4e90e3a62c3c4d831f2a7 @@ -0,0 +1,97 @@ +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 16F56431FCB + for ; Sun, 8 Dec 2013 07:53:23 -0800 (PST) +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 7W4aTCtzzkSH for ; + Sun, 8 Dec 2013 07:53:16 -0800 (PST) +Received: from yantan.tethera.net (yantan.tethera.net [199.188.72.155]) + (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id 2A033429E31 + for ; Sun, 8 Dec 2013 07:53:10 -0800 (PST) +Received: from remotemail by yantan.tethera.net with local (Exim 4.80) + (envelope-from ) + id 1VpgfN-0006Am-Oe; Sun, 08 Dec 2013 11:53:09 -0400 +Received: (nullmailer pid 22778 invoked by uid 1000); Sun, 08 Dec 2013 + 15:52:31 -0000 +From: David Bremner +To: notmuch@notmuchmail.org +Subject: [PATCH 1/4] test: pass expected output through json_sanitize in 2 + places +Date: Sun, 8 Dec 2013 23:52:23 +0800 +Message-Id: <1386517946-22054-2-git-send-email-david@tethera.net> +X-Mailer: git-send-email 1.8.4.3 +In-Reply-To: <1386517946-22054-1-git-send-email-david@tethera.net> +References: <1386517946-22054-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: Sun, 08 Dec 2013 15:53:23 -0000 + +This makes the tests more robust against changes in the +sanitization rules. +--- + test/missing-headers | 8 +++++--- + test/multipart | 2 +- + 2 files changed, 6 insertions(+), 4 deletions(-) + +diff --git a/test/missing-headers b/test/missing-headers +index 43e861b..cb38301 100755 +--- a/test/missing-headers ++++ b/test/missing-headers +@@ -95,7 +95,7 @@ Body + + test_begin_subtest "Show: json" + output=$(notmuch show --format=json '*' | notmuch_json_show_sanitize) +-test_expect_equal_json "$output" ' ++expected=$(notmuch_json_show_sanitize <OUTPUT +-cat <EXPECTED ++cat <EXPECTED + {"reply-headers": {"Subject": "Re: Multipart message", + "From": "Notmuch Test Suite ", + "To": "Carl Worth , cworth@cworth.org", +-- +1.8.4.3 + -- 2.26.2