[PATCH] test/README: mention the test_expect_equal_json and *sanitize* functions
authorAaron Ecay <aaronecay@gmail.com>
Wed, 6 Mar 2013 03:34:42 +0000 (22:34 +1900)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:53:55 +0000 (09:53 -0800)
6b/0d8fa0887b036758992dbd062b1dd64601c60e [new file with mode: 0644]

diff --git a/6b/0d8fa0887b036758992dbd062b1dd64601c60e b/6b/0d8fa0887b036758992dbd062b1dd64601c60e
new file mode 100644 (file)
index 0000000..c2acf00
--- /dev/null
@@ -0,0 +1,110 @@
+Return-Path: <aaronecay@gmail.com>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id 79D6A431FBC\r
+       for <notmuch@notmuchmail.org>; Tue,  5 Mar 2013 19:34:46 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.799\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5\r
+       tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
+       FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+       with ESMTP id BWZ+nWkfTiPb for <notmuch@notmuchmail.org>;\r
+       Tue,  5 Mar 2013 19:34:46 -0800 (PST)\r
+Received: from mail-qa0-f41.google.com (mail-qa0-f41.google.com\r
+       [209.85.216.41]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
+       (No client certificate requested)\r
+       by olra.theworths.org (Postfix) with ESMTPS id 0AEC5431FAE\r
+       for <notmuch@notmuchmail.org>; Tue,  5 Mar 2013 19:34:46 -0800 (PST)\r
+Received: by mail-qa0-f41.google.com with SMTP id bs12so2285179qab.7\r
+       for <notmuch@notmuchmail.org>; Tue, 05 Mar 2013 19:34:45 -0800 (PST)\r
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;\r
+       h=x-received:from:to:subject:date:message-id:x-mailer;\r
+       bh=5zA3gs2ShwST3YkD0xsIhPqkYnTQ+jCAkHYYT+koaXY=;\r
+       b=CBNOZqlq3C/VoSDG34SLPi0ixNL0+9+euaiJVkT95tvkQP00aJK2XhgtqxJFq4Ob/O\r
+       U7mp6C6CY4feika7BAWjRLTQk2twvRNsYTmYdWWtdzWtVvu8r54lWp1CgE/PppRVVkSJ\r
+       oeHgPUyHAXokTTVar7mjkhZq+Q49gKZ9gWrxjF1C+sbbnXvk6og2MBwzBPK9XMvE+7+0\r
+       JbFBTPys6h4c5Qb7RsYd0IrE87/M6ILVJYRfTkJkKtjjJnlmMnSCzNTlWB2NiKONugqW\r
+       kulLhc5VIVqo146d862lU1OeAdtY5+5DxEBzsGZha8BIo2d1/Oh3iuO6vrwRT7Shrgbz\r
+       nHaA==\r
+X-Received: by 10.224.78.196 with SMTP id m4mr15137174qak.67.1362540885526;\r
+       Tue, 05 Mar 2013 19:34:45 -0800 (PST)\r
+Received: from haize.hsd1.pa.comcast.net (c-68-80-94-73.hsd1.pa.comcast.net.\r
+       [68.80.94.73])\r
+       by mx.google.com with ESMTPS id dt10sm46580562qab.0.2013.03.05.19.34.44\r
+       (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128);\r
+       Tue, 05 Mar 2013 19:34:45 -0800 (PST)\r
+From: Aaron Ecay <aaronecay@gmail.com>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH] test/README: mention the test_expect_equal_json and\r
+       *sanitize* functions\r
+Date: Tue,  5 Mar 2013 22:34:42 -0500\r
+Message-Id: <1362540882-1894-1-git-send-email-aaronecay@gmail.com>\r
+X-Mailer: git-send-email 1.8.1.5\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+       <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Wed, 06 Mar 2013 03:34:46 -0000\r
+\r
+also fix one typo\r
+---\r
+ test/README | 22 +++++++++++++++++++++-\r
+ 1 file changed, 21 insertions(+), 1 deletion(-)\r
+\r
+diff --git a/test/README b/test/README\r
+index 81c232d..d12cff2 100644\r
+--- a/test/README\r
++++ b/test/README\r
+@@ -178,11 +178,18 @@ library for your script to use.\r
\r
+  test_expect_equal_file <file1> <file2>\r
\r
+-   Identical to test_exepect_equal, except that <file1> and <file2>\r
++   Identical to test_expect_equal, except that <file1> and <file2>\r
+    are files instead of strings.  This is a much more robust method to\r
+    compare formatted textual information, since it also notices\r
+    whitespace and closing newline differences.\r
\r
++ test_expect_equal_json <output> <expected>\r
++\r
++   Identical to test_expect_equal, except that the two strings are\r
++   treated as JSON and canonicalized before equality testing.  This is\r
++   useful to abstract away from whitespace differences in the expected\r
++   output and that generated by running a notmuch command.\r
++\r
+  test_debug <script>\r
\r
+    This takes a single argument, <script>, and evaluates it only\r
+@@ -253,3 +260,16 @@ variables which are useful in writing tests:\r
+     generated script that should be called instead of notmuch to do\r
+     the counting.  The notmuch_counter_value() function prints the\r
+     current counter value.\r
++\r
++There are also functions which remove various environment-dependent\r
++values from notmuch output; these are useful to ensure that test\r
++results remain consistent across different machines.\r
++\r
++ notmuch_search_sanitize\r
++ notmuch_show_sanitize\r
++ notmuch_show_sanitize_all\r
++ notmuch_json_show_sanitize\r
++\r
++   All these functions should receive the text to be sanitized as the\r
++   input of a pipe, e.g.\r
++   output=`notmuch search "..." | notmuch_search_sanitize`\r
+-- \r
+1.8.1.5\r
+\r