1 Return-Path: <dme@dme.org>
\r
2 X-Original-To: notmuch@notmuchmail.org
\r
3 Delivered-To: notmuch@notmuchmail.org
\r
4 Received: from localhost (localhost [127.0.0.1])
\r
5 by olra.theworths.org (Postfix) with ESMTP id 7FE62431FCB
\r
6 for <notmuch@notmuchmail.org>; Mon, 16 Jan 2012 08:47:44 -0800 (PST)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5
\r
12 tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled
\r
13 Received: from olra.theworths.org ([127.0.0.1])
\r
14 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
15 with ESMTP id 2k9FKu2IEPkm for <notmuch@notmuchmail.org>;
\r
16 Mon, 16 Jan 2012 08:47:40 -0800 (PST)
\r
17 Received: from mail-ww0-f45.google.com (mail-ww0-f45.google.com
\r
18 [74.125.82.45]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client
\r
19 certificate requested) by olra.theworths.org (Postfix) with ESMTPS id
\r
20 B3009431FAE for <notmuch@notmuchmail.org>; Mon, 16 Jan 2012 08:47:38 -0800
\r
22 Received: by mail-ww0-f45.google.com with SMTP id dr13so398317wgb.2
\r
23 for <notmuch@notmuchmail.org>; Mon, 16 Jan 2012 08:47:38 -0800 (PST)
\r
24 Received: by 10.180.14.72 with SMTP id n8mr21365246wic.22.1326732458400;
\r
25 Mon, 16 Jan 2012 08:47:38 -0800 (PST)
\r
26 Received: from hotblack-desiato.hh.sledj.net
\r
27 (host81-149-164-25.in-addr.btopenworld.com. [81.149.164.25])
\r
28 by mx.google.com with ESMTPS id di5sm35021507wib.3.2012.01.16.08.47.36
\r
29 (version=TLSv1/SSLv3 cipher=OTHER);
\r
30 Mon, 16 Jan 2012 08:47:37 -0800 (PST)
\r
31 Received: by hotblack-desiato.hh.sledj.net (Postfix, from userid 30000)
\r
32 id 5ECF2A0397; Mon, 16 Jan 2012 16:47:35 +0000 (GMT)
\r
33 From: David Edmondson <dme@dme.org>
\r
34 To: notmuch@notmuchmail.org
\r
35 Subject: [PATCH 1/2] test: Add "test_expect_emacs_t" to assist with emacs
\r
37 Date: Mon, 16 Jan 2012 16:47:32 +0000
\r
38 Message-Id: <1326732453-23377-1-git-send-email-dme@dme.org>
\r
39 X-Mailer: git-send-email 1.7.7.3
\r
40 X-BeenThere: notmuch@notmuchmail.org
\r
41 X-Mailman-Version: 2.1.13
\r
43 List-Id: "Use and development of the notmuch mail system."
\r
44 <notmuch.notmuchmail.org>
\r
45 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
46 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
47 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
48 List-Post: <mailto:notmuch@notmuchmail.org>
\r
49 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
50 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
51 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
52 X-List-Received-Date: Mon, 16 Jan 2012 16:47:44 -0000
\r
54 "test_expect_emacs_t" expects a single argument. If this is `t' then
\r
55 the test passes. Otherwise the argument provides the details of the
\r
56 test failure to be reported.
\r
59 For use in the following set of tests and later for other emacs related tests.
\r
61 test/test-lib.sh | 20 ++++++++++++++++++++
\r
62 1 files changed, 20 insertions(+), 0 deletions(-)
\r
64 diff --git a/test/test-lib.sh b/test/test-lib.sh
\r
65 index d1fbc05..0ffe9a6 100644
\r
66 --- a/test/test-lib.sh
\r
67 +++ b/test/test-lib.sh
\r
68 @@ -503,6 +503,26 @@ test_expect_equal_file ()
\r
72 +# Pass test if the result is `t', else report the results.
\r
73 +test_expect_emacs_t ()
\r
75 + exec 1>&6 2>&7 # Restore stdout and stderr
\r
78 + error "bug in the test script: not 1 parameter to test_expect_emacs_t"
\r
81 + if ! test_skip "$test_subtest_name"
\r
83 + if [ "${result}" == "t" ] ; then
\r
84 + test_ok_ "$test_subtest_name"
\r
86 + testname=$this_test.$test_count
\r
87 + test_failure_ "$test_subtest_name" "$(eval printf ${result})"
\r
94 notmuch new | grep -v -E -e '^Processed [0-9]*( total)? file|Found [0-9]* total file'
\r