Re: [PATCH] emacs: wash: make word-wrap bound message width
[notmuch-archives.git] / b1 / 721309e250188175562186df669c5fe68ad233
1 Return-Path: <cceleri@cs.stanford.edu>\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 2329E431FC0\r
6         for <notmuch@notmuchmail.org>; Sat, 10 May 2014 08:53:58 -0700 (PDT)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: -2.3\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-2.3 tagged_above=-999 required=5\r
12         tests=[RCVD_IN_DNSWL_MED=-2.3] 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 JnvqomgQwVnH for <notmuch@notmuchmail.org>;\r
16         Sat, 10 May 2014 08:53:50 -0700 (PDT)\r
17 Received: from smtp1.cs.Stanford.EDU (smtp1.cs.Stanford.EDU [171.64.64.25])\r
18         (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))\r
19         (No client certificate requested)\r
20         by olra.theworths.org (Postfix) with ESMTPS id 877BF431FBF\r
21         for <notmuch@notmuchmail.org>; Sat, 10 May 2014 08:53:50 -0700 (PDT)\r
22 Received: from c-24-11-133-78.hsd1.sc.comcast.net ([24.11.133.78]\r
23         helo=jane.lan)\r
24         by smtp1.cs.Stanford.EDU with esmtpsa (TLSv1:DHE-RSA-SEED-SHA:128)\r
25         (Exim 4.80.1) (envelope-from <cceleri@cs.stanford.edu>)\r
26         id 1Wj9at-0006x1-Hi; Sat, 10 May 2014 08:53:48 -0700\r
27 From: Charles Celerier <cceleri@cs.stanford.edu>\r
28 To: notmuch@notmuchmail.org\r
29 Subject: [PATCH v2 2/5] test: Made T010-help-test and T020-compact tests more\r
30         portable.\r
31 Date: Sat, 10 May 2014 11:53:44 -0400\r
32 Message-Id: <1399737224-79348-1-git-send-email-cceleri@cs.stanford.edu>\r
33 X-Mailer: git-send-email 1.8.5.2 (Apple Git-48)\r
34 In-Reply-To: <id:1399395748-44920-5-git-send-email-cceleri@cs.stanford.edu>\r
35 References: <id:1399395748-44920-5-git-send-email-cceleri@cs.stanford.edu>\r
36 X-Scan-Signature: 34530ccd932157cd24ba9d2c27818ca4\r
37 X-BeenThere: notmuch@notmuchmail.org\r
38 X-Mailman-Version: 2.1.13\r
39 Precedence: list\r
40 List-Id: "Use and development of the notmuch mail system."\r
41         <notmuch.notmuchmail.org>\r
42 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
43         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
44 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
45 List-Post: <mailto:notmuch@notmuchmail.org>\r
46 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
47 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
48         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
49 X-List-Received-Date: Sat, 10 May 2014 15:53:58 -0000\r
50 \r
51 The tests T010-help-test and T020-compact use the files have-man and\r
52 have-compact, respectively, as indicators of how notmuch is configured.\r
53 These were symbolic links to true and false for use in bash tests.\r
54 Unfortunately, the paths to true and false may not be the same on all\r
55 platforms (e.g. on Mac OS X they are in /usr/bin), so hard-coding\r
56 symbolic links to /bin/true and /bin/false is not portable. This patch\r
57 writes a 1 to have-man and have-compact to indicate true, and a 0 to\r
58 indicate false, instead. The tests now read the contents of the file to\r
59 determine the truth value instead of following the symbolic link.\r
60 \r
61 Signed-off-by: Charles Celerier <cceleri@cs.stanford.edu>\r
62 ---\r
63  test/Makefile.local    | 8 ++++----\r
64  test/T010-help-test.sh | 2 +-\r
65  test/T020-compact.sh   | 2 +-\r
66  3 files changed, 6 insertions(+), 6 deletions(-)\r
67 \r
68 diff --git a/test/Makefile.local b/test/Makefile.local\r
69 index d622eaf..8fd333c 100644\r
70 --- a/test/Makefile.local\r
71 +++ b/test/Makefile.local\r
72 @@ -37,16 +37,16 @@ $(dir)/parse-time: $(dir)/parse-time.o parse-time-string/parse-time-string.o\r
73  \r
74  $(dir)/have-compact: Makefile.config\r
75  ifeq ($(HAVE_XAPIAN_COMPACT),1)\r
76 -       ln -sf /bin/true $@\r
77 +       echo 1 > $@\r
78  else\r
79 -       ln -sf /bin/false $@\r
80 +       echo 0 > $@\r
81  endif\r
82  \r
83  $(dir)/have-man: Makefile.config\r
84  ifeq ($(HAVE_SPHINX)$(HAVE_RST2MAN),00)\r
85 -       ln -sf /bin/false $@\r
86 +       echo 0 > $@\r
87  else\r
88 -       ln -sf /bin/true $@\r
89 +       echo 1 > $@\r
90  endif\r
91  \r
92  .PHONY: test check\r
93 diff --git a/test/T010-help-test.sh b/test/T010-help-test.sh\r
94 index 77410bc..02162ca 100755\r
95 --- a/test/T010-help-test.sh\r
96 +++ b/test/T010-help-test.sh\r
97 @@ -7,7 +7,7 @@ test_expect_success 'notmuch --help' 'notmuch --help'\r
98  test_expect_success 'notmuch help' 'notmuch help'\r
99  test_expect_success 'notmuch --version' 'notmuch --version'\r
100  \r
101 -if ${TEST_DIRECTORY}/have-man; then\r
102 +if grep -q 1 ${TEST_DIRECTORY}/have-man ; then\r
103      test_expect_success 'notmuch --help tag' 'notmuch --help tag'\r
104      test_expect_success 'notmuch help tag' 'notmuch help tag'\r
105  else\r
106 diff --git a/test/T020-compact.sh b/test/T020-compact.sh\r
107 index 77bb963..0139584 100755\r
108 --- a/test/T020-compact.sh\r
109 +++ b/test/T020-compact.sh\r
110 @@ -10,7 +10,7 @@ notmuch tag +tag1 \*\r
111  notmuch tag +tag2 subject:Two\r
112  notmuch tag -tag1 +tag3 subject:Three\r
113  \r
114 -if ! ${TEST_DIRECTORY}/have-compact; then\r
115 +if grep -q 0 ${TEST_DIRECTORY}/have-compact; then\r
116      test_begin_subtest "Compact unsupported: error message"\r
117      output=$(notmuch compact --quiet 2>&1)\r
118      test_expect_equal "$output" "notmuch was compiled against a xapian version lacking compaction support.\r
119 -- \r
120 1.8.5.2 (Apple Git-48)\r
121 \r