[PATCH 2/9] lib: private string map (associative array) API
[notmuch-archives.git] / b1 / bf7cd4246efbc170332709550e36b4e3a4d781
1 Return-Path: <bremner@tesseract.cs.unb.ca>\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 B1949429E2F\r
6         for <notmuch@notmuchmail.org>; Mon,  9 Dec 2013 05:37:49 -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\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]\r
12         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 bUDFyEbETP8f for <notmuch@notmuchmail.org>;\r
16         Mon,  9 Dec 2013 05:37:47 -0800 (PST)\r
17 Received: from yantan.tethera.net (yantan.tethera.net [199.188.72.155])\r
18         (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits))\r
19         (No client certificate requested)\r
20         by olra.theworths.org (Postfix) with ESMTPS id 1D455431FDA\r
21         for <notmuch@notmuchmail.org>; Mon,  9 Dec 2013 05:37:47 -0800 (PST)\r
22 Received: from remotemail by yantan.tethera.net with local (Exim 4.80)\r
23         (envelope-from <bremner@tesseract.cs.unb.ca>)\r
24         id 1Vq11s-0003FP-Jr; Mon, 09 Dec 2013 09:37:44 -0400\r
25 Received: (nullmailer pid 27764 invoked by uid 1000); Mon, 09 Dec 2013\r
26         13:37:22 -0000\r
27 From: David Bremner <david@tethera.net>\r
28 To: notmuch@notmuchmail.org\r
29 Subject: [Patch v2 4/4] test: give unique timestamps to messages\r
30 Date: Mon,  9 Dec 2013 21:36:31 +0800\r
31 Message-Id: <1386596191-27683-4-git-send-email-david@tethera.net>\r
32 X-Mailer: git-send-email 1.8.4.3\r
33 In-Reply-To: <1386596191-27683-1-git-send-email-david@tethera.net>\r
34 References: <1386517946-22054-1-git-send-email-david@tethera.net>\r
35         <1386596191-27683-1-git-send-email-david@tethera.net>\r
36 X-BeenThere: notmuch@notmuchmail.org\r
37 X-Mailman-Version: 2.1.13\r
38 Precedence: list\r
39 List-Id: "Use and development of the notmuch mail system."\r
40         <notmuch.notmuchmail.org>\r
41 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
42         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
43 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
44 List-Post: <mailto:notmuch@notmuchmail.org>\r
45 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
46 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
47         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
48 X-List-Received-Date: Mon, 09 Dec 2013 13:37:50 -0000\r
49 \r
50 The choice of decreasing timestamps is a hack which reduces the number\r
51 of existing tests which fail.  This can be changed to increasing\r
52 if/when somebody wants update another 47 tests.\r
53 ---\r
54  test/excludes    | 4 ++--\r
55  test/test-lib.sh | 6 +++++-\r
56  2 files changed, 7 insertions(+), 3 deletions(-)\r
57 \r
58 diff --git a/test/excludes b/test/excludes\r
59 index f1ae9ea..8bbbc2d 100755\r
60 --- a/test/excludes\r
61 +++ b/test/excludes\r
62 @@ -67,7 +67,7 @@ thread:XXX   2001-01-05 [1/2] Notmuch Test Suite; Not deleted reply (deleted inb\r
63  test_begin_subtest "Search, don't exclude \"deleted\" messages when --exclude=flag specified"\r
64  output=$(notmuch search --exclude=flag subject:deleted | notmuch_search_sanitize)\r
65  test_expect_equal "$output" "thread:XXX   2001-01-05 [1/1] Notmuch Test Suite; Not deleted (inbox unread)\r
66 -thread:XXX   2001-01-05 [1/2] Notmuch Test Suite; Not deleted reply (deleted inbox unread)"\r
67 +thread:XXX   2001-01-05 [1/2] Notmuch Test Suite; Deleted (deleted inbox unread)"\r
68  \r
69  test_begin_subtest "Search, don't exclude \"deleted\" messages from search if not configured"\r
70  notmuch config set search.exclude_tags\r
71 @@ -152,7 +152,7 @@ ${matching_message_ids[5]}"\r
72  test_begin_subtest "Search, exclude=flag (thread summary)"\r
73  output=$(notmuch search --exclude=flag tag:test | notmuch_search_sanitize)\r
74  test_expect_equal "$output" "thread:XXX   2001-01-05 [0/6] Notmuch Test Suite; All messages excluded: single match: reply 2 (deleted inbox test unread)\r
75 -thread:XXX   2001-01-05 [0/6] Notmuch Test Suite; All messages excluded: double match: reply 4 (deleted inbox test unread)\r
76 +thread:XXX   2001-01-05 [0/6] Notmuch Test Suite; All messages excluded: double match: reply 2 (deleted inbox test unread)\r
77  thread:XXX   2001-01-05 [0/6] Notmuch Test Suite; Some messages excluded: single excluded match: reply 3 (deleted inbox test unread)\r
78  thread:XXX   2001-01-05 [1/6] Notmuch Test Suite; Some messages excluded: single non-excluded match: reply 4 (deleted inbox test unread)\r
79  thread:XXX   2001-01-05 [1/6] Notmuch Test Suite; No messages excluded: single match: reply 3 (inbox test unread)"\r
80 diff --git a/test/test-lib.sh b/test/test-lib.sh\r
81 index d22408d..53cb947 100644\r
82 --- a/test/test-lib.sh\r
83 +++ b/test/test-lib.sh\r
84 @@ -356,7 +356,11 @@ generate_message ()\r
85      fi\r
86  \r
87      if [ -z "${template[date]}" ]; then\r
88 -       template[date]="Fri, 05 Jan 2001 15:43:57 +0000"\r
89 +       # we use decreasing timestamps here for historical reasons;\r
90 +       # the existing test suite when we converted to unique timestamps just\r
91 +       # happened to have signicantly fewer failures with that choice.\r
92 +       template[date]=$(TZ=UTC printf "%(%a, %d %b %Y %T %z)T\n" \\r
93 +                       $((978709437 - gen_msg_cnt)))\r
94      fi\r
95  \r
96      additional_headers=""\r
97 -- \r
98 1.8.4.3\r
99 \r