Re: [PATCH 0/4] Allow specifying alternate names for addresses in other_email
[notmuch-archives.git] / 00 / e41e57ff8efa72eae8b7a39842109f1dc70f26
1 Return-Path: <sojkam1@fel.cvut.cz>\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 4D7CA40DBC9\r
6         for <notmuch@notmuchmail.org>; Sun, 14 Nov 2010 13:55:08 -0800 (PST)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: -1.9\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-1.9 tagged_above=-999 required=5\r
12         tests=[BAYES_00=-1.9] autolearn=ham\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 v8WRz8cUu8db for <notmuch@notmuchmail.org>;\r
16         Sun, 14 Nov 2010 13:54:54 -0800 (PST)\r
17 Received: from max.feld.cvut.cz (max.feld.cvut.cz [147.32.192.36])\r
18         by olra.theworths.org (Postfix) with ESMTP id 4909140DBD2\r
19         for <notmuch@notmuchmail.org>; Sun, 14 Nov 2010 13:54:42 -0800 (PST)\r
20 Received: from localhost (unknown [192.168.200.4])\r
21         by max.feld.cvut.cz (Postfix) with ESMTP id 9E84B19F3336;\r
22         Sun, 14 Nov 2010 22:54:41 +0100 (CET)\r
23 X-Virus-Scanned: IMAP AMAVIS\r
24 Received: from max.feld.cvut.cz ([192.168.200.1])\r
25         by localhost (styx.feld.cvut.cz [192.168.200.4]) (amavisd-new,\r
26         port 10044)\r
27         with ESMTP id lbxxtHJeAz-M; Sun, 14 Nov 2010 22:54:40 +0100 (CET)\r
28 Received: from imap.feld.cvut.cz (imap.feld.cvut.cz [147.32.192.34])\r
29         by max.feld.cvut.cz (Postfix) with ESMTP id 0D44619F3345;\r
30         Sun, 14 Nov 2010 22:54:40 +0100 (CET)\r
31 Received: from steelpick.2x.cz (unknown [213.29.198.144])\r
32         (Authenticated sender: sojkam1)\r
33         by imap.feld.cvut.cz (Postfix) with ESMTPSA id 03B40FA004;\r
34         Sun, 14 Nov 2010 22:54:40 +0100 (CET)\r
35 Received: from wsh by steelpick.2x.cz with local (Exim 4.72)\r
36         (envelope-from <sojkam1@fel.cvut.cz>)\r
37         id 1PHkX1-0002P6-Ie; Sun, 14 Nov 2010 22:54:39 +0100\r
38 From: Michal Sojka <sojkam1@fel.cvut.cz>\r
39 To: notmuch@notmuchmail.org\r
40 Subject: [PATCH 4/5] test: Detect unfinished subsets\r
41 Date: Sun, 14 Nov 2010 22:54:31 +0100\r
42 Message-Id: <1289771672-9204-4-git-send-email-sojkam1@fel.cvut.cz>\r
43 X-Mailer: git-send-email 1.7.2.3\r
44 In-Reply-To: <87hbfjr2sr.fsf@steelpick.2x.cz>\r
45 References: <87hbfjr2sr.fsf@steelpick.2x.cz>\r
46 X-BeenThere: notmuch@notmuchmail.org\r
47 X-Mailman-Version: 2.1.13\r
48 Precedence: list\r
49 List-Id: "Use and development of the notmuch mail system."\r
50         <notmuch.notmuchmail.org>\r
51 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
52         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
53 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
54 List-Post: <mailto:notmuch@notmuchmail.org>\r
55 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
56 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
57         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
58 X-List-Received-Date: Sun, 14 Nov 2010 21:55:08 -0000\r
59 \r
60 When test_begin_subtest is not followed by corresponding test_expect_equal,\r
61 the output of the rest of the test script is errornously suppressed. Add\r
62 code to detect these bugs in test scripts.\r
63 ---\r
64  test/test-lib.sh |    6 ++++++\r
65  1 files changed, 6 insertions(+), 0 deletions(-)\r
66 \r
67 diff --git a/test/test-lib.sh b/test/test-lib.sh\r
68 index dce9077..04a4c14 100644\r
69 --- a/test/test-lib.sh\r
70 +++ b/test/test-lib.sh\r
71 @@ -396,12 +396,17 @@ add_email_corpus ()\r
72  \r
73  test_begin_subtest ()\r
74  {\r
75 +    if [ -n "$inside_subtest" ]; then\r
76 +       exec 1>&6 2>&7          # Restore stdout and stderr\r
77 +       error "bug in test script: Missing test_expect_equal in ${BASH_SOURCE[1]}:${BASH_LINENO[0]}"\r
78 +    fi\r
79      test_subtest_name="$1"\r
80      # Remember stdout and stderr file descriptios and redirect test\r
81      # output to the previously prepared file descriptors 3 and 4 (see\r
82      # bellow)\r
83      if test "$verbose" != "t"; then exec 4>test.output 3>&4; fi\r
84      exec 6>&1 7>&2 >&3 2>&4\r
85 +    inside_subtest=t\r
86  }\r
87  \r
88  # Pass test if two arguments match\r
89 @@ -413,6 +418,7 @@ test_begin_subtest ()\r
90  test_expect_equal ()\r
91  {\r
92         exec 1>&6 2>&7          # Restore stdout and stderr\r
93 +       inside_subtest=\r
94         test "$#" = 3 && { prereq=$1; shift; } || prereq=\r
95         test "$#" = 2 ||\r
96         error "bug in the test script: not 2 or 3 parameters to test_expect_equal"\r
97 -- \r
98 1.7.2.3\r
99 \r