From 4e468f5216302d7cebbe573b8c791f7b75a0374f Mon Sep 17 00:00:00 2001 From: David Bremner Date: Mon, 9 Dec 2013 21:36:28 +0800 Subject: [PATCH] [Patch v2 1/4] test: pass expected output through json_sanitize in 2 places --- de/e307b3ac0ed03edf1fd1b27028d5c4fd0d7fdd | 97 +++++++++++++++++++++++ 1 file changed, 97 insertions(+) create mode 100644 de/e307b3ac0ed03edf1fd1b27028d5c4fd0d7fdd diff --git a/de/e307b3ac0ed03edf1fd1b27028d5c4fd0d7fdd b/de/e307b3ac0ed03edf1fd1b27028d5c4fd0d7fdd new file mode 100644 index 000000000..0aa7a2f0b --- /dev/null +++ b/de/e307b3ac0ed03edf1fd1b27028d5c4fd0d7fdd @@ -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 431B2431FC0 + for ; Mon, 9 Dec 2013 05:37:37 -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 2QyjJgjU5B+1 for ; + Mon, 9 Dec 2013 05:37:33 -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 F0719431FBC + for ; Mon, 9 Dec 2013 05:37:32 -0800 (PST) +Received: from remotemail by yantan.tethera.net with local (Exim 4.80) + (envelope-from ) + id 1Vq11d-0003F5-U7; Mon, 09 Dec 2013 09:37:29 -0400 +Received: (nullmailer pid 27757 invoked by uid 1000); Mon, 09 Dec 2013 + 13:37:22 -0000 +From: David Bremner +To: notmuch@notmuchmail.org +Subject: [Patch v2 1/4] test: pass expected output through json_sanitize in 2 + places +Date: Mon, 9 Dec 2013 21:36:28 +0800 +Message-Id: <1386596191-27683-1-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: Mon, 09 Dec 2013 13:37:37 -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 ++notmuch_json_show_sanitize <EXPECTED + {"reply-headers": {"Subject": "Re: Multipart message", + "From": "Notmuch Test Suite ", + "To": "Carl Worth , cworth@cworth.org", +-- +1.8.4.3 + -- 2.26.2