Re: [PATCH] emacs: wash: make word-wrap bound message width
[notmuch-archives.git] / 5c / 1ee71c50497430375b365096615ce14bc93672
1 Return-Path: <dmitry.kurochkin@gmail.com>\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 7D70F429E25\r
6         for <notmuch@notmuchmail.org>; Fri, 18 Nov 2011 07:21:23 -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: -0.799\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5\r
12         tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
13         FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
14 Received: from olra.theworths.org ([127.0.0.1])\r
15         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
16         with ESMTP id cq9zqGObnP0L for <notmuch@notmuchmail.org>;\r
17         Fri, 18 Nov 2011 07:21:19 -0800 (PST)\r
18 Received: from mail-bw0-f53.google.com (mail-bw0-f53.google.com\r
19         [209.85.214.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
20         (No client certificate requested)\r
21         by olra.theworths.org (Postfix) with ESMTPS id 24F09431FD0\r
22         for <notmuch@notmuchmail.org>; Fri, 18 Nov 2011 07:21:19 -0800 (PST)\r
23 Received: by bkaq10 with SMTP id q10so3867369bka.26\r
24         for <notmuch@notmuchmail.org>; Fri, 18 Nov 2011 07:21:17 -0800 (PST)\r
25 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;\r
26         h=from:to:subject:date:message-id:x-mailer;\r
27         bh=smtuXbAO23TMkFSZFRtFuAcsRmCBSXLvFMUXsFsdZgw=;\r
28         b=k6f/NgUMiT32249/OIrDeD7dWoy0ypwuho/9vnVDm3MKt9PYRuCgcgzkXJnZJFkUdm\r
29         D0NJsdKyzz31wv92YbbutARcI78ElkBn2G/apZL5CgGD7mDOQBiru4g03f6zm3jtPdvu\r
30         0sxU9Gtc0j8InAGn4pckz0imdcSlvcxXIDIkg=\r
31 Received: by 10.205.132.148 with SMTP id hu20mr3705286bkc.117.1321629677441;\r
32         Fri, 18 Nov 2011 07:21:17 -0800 (PST)\r
33 Received: from localhost ([91.144.186.21])\r
34         by mx.google.com with ESMTPS id cc2sm969523bkb.8.2011.11.18.07.21.15\r
35         (version=TLSv1/SSLv3 cipher=OTHER);\r
36         Fri, 18 Nov 2011 07:21:16 -0800 (PST)\r
37 From: Dmitry Kurochkin <dmitry.kurochkin@gmail.com>\r
38 To: notmuch@notmuchmail.org\r
39 Subject: [PATCH] test: fix sed error in basic tests\r
40 Date: Fri, 18 Nov 2011 19:21:00 +0400\r
41 Message-Id: <1321629660-10093-1-git-send-email-dmitry.kurochkin@gmail.com>\r
42 X-Mailer: git-send-email 1.7.7.3\r
43 X-BeenThere: notmuch@notmuchmail.org\r
44 X-Mailman-Version: 2.1.13\r
45 Precedence: list\r
46 List-Id: "Use and development of the notmuch mail system."\r
47         <notmuch.notmuchmail.org>\r
48 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
49         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
50 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
51 List-Post: <mailto:notmuch@notmuchmail.org>\r
52 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
53 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
54         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
55 X-List-Received-Date: Fri, 18 Nov 2011 15:21:23 -0000\r
56 \r
57 The error is easy to miss, because the test passes and stderr is not\r
58 printed.  But if you run basic tests in verbose mode (./basic\r
59 --verbose), you get:\r
60 \r
61   sed: can't read notmuch-test: No such file or directory\r
62 \r
63 The issue is that sed command is given two files: notmuch-test and\r
64 $TEST_DIRECTORY/notmuch-test.  And there is no notmuch-test file in\r
65 the current directory (test/tmp.basic/).  The patch just removes the\r
66 non-existing file from the sed command.\r
67 ---\r
68  test/basic |    2 +-\r
69  1 files changed, 1 insertions(+), 1 deletions(-)\r
70 \r
71 diff --git a/test/basic b/test/basic\r
72 index 38db2ba..032c9f7 100755\r
73 --- a/test/basic\r
74 +++ b/test/basic\r
75 @@ -34,41 +34,41 @@ test_expect_success 'tests clean up after themselves' '\r
76  '\r
77  \r
78  cleaner=no\r
79  test_expect_code 1 'tests clean up even after a failure' '\r
80      test_when_finished cleaner=yes &&\r
81      (exit 1)\r
82  '\r
83  \r
84  if test $clean$cleaner != yesyes\r
85  then\r
86         say "bug in test framework: cleanup commands do not work reliably"\r
87         exit 1\r
88  fi\r
89  \r
90  test_expect_code 2 'failure to clean up causes the test to fail' '\r
91      test_when_finished "(exit 2)"\r
92  '\r
93  \r
94  # Ensure that all tests are being run\r
95  test_begin_subtest 'Ensure that all available tests will be run by notmuch-test'\r
96 -eval $(sed -n -e '/^TESTS="$/,/^"$/p' notmuch-test $TEST_DIRECTORY/notmuch-test)\r
97 +eval $(sed -n -e '/^TESTS="$/,/^"$/p' $TEST_DIRECTORY/notmuch-test)\r
98  tests_in_suite=$(for i in $TESTS; do echo $i; done | sort)\r
99  available=$(ls -1 $TEST_DIRECTORY/ | \\r
100      sed -r -e "/^(aggregate-results.sh|Makefile|Makefile.local|notmuch-test)/d" \\r
101            -e "/^(README|test-lib.sh|test-lib.el|test-results|tmp.*|valgrind|corpus*)/d" \\r
102            -e "/^(emacs.expected-output|smtp-dummy|smtp-dummy.c|test-verbose|symbol-test.cc)/d" \\r
103            -e "/^(test.expected-output|.*~)/d" \\r
104            -e "/^(gnupg-secret-key.asc)/d" \\r
105            -e "/^(gnupg-secret-key.NOTE)/d" \\r
106            -e "/^(atomicity.gdb)/d" \\r
107            | sort)\r
108  test_expect_equal "$tests_in_suite" "$available"\r
109  \r
110  EXPECTED=$TEST_DIRECTORY/test.expected-output\r
111  suppress_diff_date() {\r
112      sed -e 's/\(.*\-\-\- test-verbose\.4\.\expected\).*/\1/' \\r
113         -e 's/\(.*\+\+\+ test-verbose\.4\.\output\).*/\1/'\r
114  }\r
115  \r
116  test_begin_subtest "Ensure that test output is suppressed unless the test fails"\r
117  output=$(cd $TEST_DIRECTORY; ./test-verbose 2>&1 | suppress_diff_date)\r
118 -- \r
119 1.7.7.3\r
120 \r