From 3eeb8e952d1cb1a6fa3bf4f269040dda9d06a090 Mon Sep 17 00:00:00 2001 From: Tomi Ollila Date: Tue, 30 Oct 2012 16:44:37 +0200 Subject: [PATCH] Re: [PATCH] contrib: notmuch-pick: add tests --- 0b/d3dbc898b7fab5a43ef3557b9b6a396915fec3 | 116 ++++++++++++++++++++++ 1 file changed, 116 insertions(+) create mode 100644 0b/d3dbc898b7fab5a43ef3557b9b6a396915fec3 diff --git a/0b/d3dbc898b7fab5a43ef3557b9b6a396915fec3 b/0b/d3dbc898b7fab5a43ef3557b9b6a396915fec3 new file mode 100644 index 000000000..6b23fc4d5 --- /dev/null +++ b/0b/d3dbc898b7fab5a43ef3557b9b6a396915fec3 @@ -0,0 +1,116 @@ +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 461BC431FBC + for ; Tue, 30 Oct 2012 07:44:39 -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 2jLZSfkXpgXJ for ; + Tue, 30 Oct 2012 07:44:38 -0700 (PDT) +Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34]) + by olra.theworths.org (Postfix) with ESMTP id 56EE7431FAF + for ; Tue, 30 Oct 2012 07:44:38 -0700 (PDT) +Received: from guru.guru-group.fi (localhost [IPv6:::1]) + by guru.guru-group.fi (Postfix) with ESMTP id 2AB5E10007D; + Tue, 30 Oct 2012 16:44:38 +0200 (EET) +From: Tomi Ollila +To: Mark Walters , notmuch@notmuchmail.org +Subject: Re: [PATCH] contrib: notmuch-pick: add tests +In-Reply-To: <1351499856-14136-1-git-send-email-markwalters1009@gmail.com> +References: <1351499856-14136-1-git-send-email-markwalters1009@gmail.com> +User-Agent: Notmuch/0.14+59~gf9031cd (http://notmuchmail.org) Emacs/24.2.1 + (x86_64-unknown-linux-gnu) +X-Face: HhBM'cA~ +MIME-Version: 1.0 +Content-Type: multipart/mixed; boundary="=-=-=" +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: Tue, 30 Oct 2012 14:44:39 -0000 + +--=-=-= +Content-Type: text/plain + +On Mon, Oct 29 2012, Mark Walters wrote: + +> The test should be run using the wrapper test-wrapper.sh. This links +> the tests into the normal notmuch TEST_DIRECTORY and runs them from +> there. After the test is complete then the links are removed. +> --- + +Looks pretty good. The emacs-pick has leading spaces and tabs mixed; +you could run whitespace-cleanup on it. + +I got a bit irritated to your test-wrapper.sh so I experimented what +could be done to make it a bit more robust. Look at the attachment +for suggestions (i.e. use and reformat parts of it freely). + +Tomi + + +--=-=-= +Content-Type: application/x-sh +Content-Disposition: inline; filename=test-wrapper.sh +Content-Transfer-Encoding: base64 +Content-Description: notmuch pick contrib test wrapper suggestions + +IyEvYmluL3NoCgpzZXQgLWV1CgpmYWlsKCkgewoJZWNobyBFUlJPUiAkMQoJZXhpdCAxCn0KClRF +U1RGSUxFUz0nZW1hY3MtcGljayBwaWNrLmV4cGVjdGVkLW91dHB1dCcKClBJQ0tfRElSPWBjZCBc +YGRpcm5hbWUgIiQwIlxgICYmIHB3ZGAKCmZvciBmIGluICRURVNURklMRVMKZG8KCXRlc3QgLWYg +IiRQSUNLX0RJUi8kZiIgfHwgZmFpbCAiJFBJQ0tfRElSLyRmIGRvZXMgbm90IGV4aXN0Igpkb25l +CgpjZCAiJFBJQ0tfRElSLy4uLy4uL3Rlc3QiCgp0ZXN0IC14IC4uL25vdG11Y2ggfHwgZmFpbCAi +YGNkIC4uICYmIHB3ZGAvbm90bXVjaCBoYXMgbm90IGJlZW4gYnVpbHQiCgpmb3IgZiBpbiAkVEVT +VEZJTEVTCmRvCglpZiB0ZXN0IC1mICIkZiIKCXRoZW4KCQlmYWlsICIkZiBleGlzdHMiCglmaQpk +b25lCgp0cmFwICJybSAtZiAkVEVTVEZJTEVTIiAwCgpmb3IgZiBpbiAkVEVTVEZJTEVTCmRvCgls +biAtcyAiJFBJQ0tfRElSLyRmIiAuCmRvbmUKCiNkb24ndCBleGVjIC0tIHRyYXBzIHdvdWxkIG5v +dCBydW4uCi4vZW1hY3MtcGljawo= +--=-=-= +Content-Type: text/plain + + + +> +> Here are some tests for notmuch-pick. I would have liked to include +> the test structure and run them from inside the pick contrib directory +> but I couldn't get all the paths to work. +> +> Hence, this slightly hacky solution of linking the relevant stuff (one +> test script and one expected output directory) into the normal notmuch +> test directory and running from there. +> +> Best wishes +> +> Mark +> +> contrib/notmuch-pick/README | 5 + +> contrib/notmuch-pick/test-wrapper.sh | 16 +++ +> contrib/notmuch-pick/test/emacs-pick | 104 ++++++++++++++++++++ +> .../notmuch-pick-single-thread | 6 + +> .../pick.expected-output/notmuch-pick-tag-inbox | 53 ++++++++++ +> 5 files changed, 184 insertions(+), 0 deletions(-) +> create mode 100755 contrib/notmuch-pick/test-wrapper.sh +> create mode 100755 contrib/notmuch-pick/test/emacs-pick +> create mode 100644 contrib/notmuch-pick/test/pick.expected-output/notmuch-pick-single-thread +> create mode 100644 contrib/notmuch-pick/test/pick.expected-output/notmuch-pick-tag-inbox + +--=-=-=-- -- 2.26.2