Re: [PATCH] test/README: mention the test_expect_equal_json and *sanitize* functions
authorTomi Ollila <tomi.ollila@iki.fi>
Wed, 6 Mar 2013 08:34:12 +0000 (10:34 +0200)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:53:56 +0000 (09:53 -0800)
73/3f70146125470be3cdd8e100e62685411f10ce [new file with mode: 0644]

diff --git a/73/3f70146125470be3cdd8e100e62685411f10ce b/73/3f70146125470be3cdd8e100e62685411f10ce
new file mode 100644 (file)
index 0000000..7c6e7cc
--- /dev/null
@@ -0,0 +1,112 @@
+Return-Path: <tomi.ollila@iki.fi>\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 0A225431FAF\r
+       for <notmuch@notmuchmail.org>; Wed,  6 Mar 2013 00:34:26 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 0\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]\r
+       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 U8XTb+B4e6pC for <notmuch@notmuchmail.org>;\r
+       Wed,  6 Mar 2013 00:34:25 -0800 (PST)\r
+Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34])\r
+       by olra.theworths.org (Postfix) with ESMTP id 09D70431FAE\r
+       for <notmuch@notmuchmail.org>; Wed,  6 Mar 2013 00:34:25 -0800 (PST)\r
+Received: from guru.guru-group.fi (localhost [IPv6:::1])\r
+       by guru.guru-group.fi (Postfix) with ESMTP id AF8D2100051;\r
+       Wed,  6 Mar 2013 10:34:12 +0200 (EET)\r
+From: Tomi Ollila <tomi.ollila@iki.fi>\r
+To: Aaron Ecay <aaronecay@gmail.com>, notmuch@notmuchmail.org\r
+Subject: Re: [PATCH] test/README: mention the test_expect_equal_json and\r
+       *sanitize* functions\r
+In-Reply-To: <1362540882-1894-1-git-send-email-aaronecay@gmail.com>\r
+References: <1362540882-1894-1-git-send-email-aaronecay@gmail.com>\r
+User-Agent: Notmuch/0.15.2+48~g8dcc33e (http://notmuchmail.org) Emacs/24.2.1\r
+       (x86_64-unknown-linux-gnu)\r
+X-Face: HhBM'cA~<r"^Xv\KRN0P{vn'Y"Kd;zg_y3S[4)KSN~s?O\"QPoL\r
+       $[Xv_BD:i/F$WiEWax}R(MPS`^UaptOGD`*/=@\1lKoVa9tnrg0TW?"r7aRtgk[F\r
+       !)g;OY^,BjTbr)Np:%c_o'jj,Z\r
+Date: Wed, 06 Mar 2013 10:34:12 +0200\r
+Message-ID: <m2ppzd3p17.fsf@guru.guru-group.fi>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain\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 08:34:26 -0000\r
+\r
+On Wed, Mar 06 2013, Aaron Ecay <aaronecay@gmail.com> wrote:\r
+\r
+> also fix one typo\r
+> ---\r
+\r
+LGTM.\r
+\r
+Tomi\r
+\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
+> _______________________________________________\r
+> notmuch mailing list\r
+> notmuch@notmuchmail.org\r
+> http://notmuchmail.org/mailman/listinfo/notmuch\r