1 Return-Path: <jani@nikula.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 9EABA431FC4
\r
6 for <notmuch@notmuchmail.org>; Wed, 12 Sep 2012 14:27:53 -0700 (PDT)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
8 X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References"
\r
12 X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5
\r
13 tests=[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 DC8h1rTbh2mi for <notmuch@notmuchmail.org>;
\r
17 Wed, 12 Sep 2012 14:27:52 -0700 (PDT)
\r
18 Received: from mail-lpp01m010-f53.google.com (mail-lpp01m010-f53.google.com
\r
19 [209.85.215.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 DFB81431FD8
\r
22 for <notmuch@notmuchmail.org>; Wed, 12 Sep 2012 14:27:47 -0700 (PDT)
\r
23 Received: by lahc1 with SMTP id c1so1533671lah.26
\r
24 for <notmuch@notmuchmail.org>; Wed, 12 Sep 2012 14:27:46 -0700 (PDT)
\r
25 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
\r
26 d=google.com; s=20120113;
\r
27 h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references
\r
28 :in-reply-to:references:x-gm-message-state;
\r
29 bh=8JEkk/rSbtgS4PDZMgAQ7yTt9nAsyYMNw+tQkEBh9BU=;
\r
30 b=hIqqnr3CwiPFzuOwIShZ8lbQMzHiTuZJ3beUNcoaJ3EQOFljjbIKEqxvz2QED+Lhax
\r
31 4/sSeZDTxRkKhj90kiczr7rYOpf0X6ejGDnHfJ62BpsLdgQdSrYJqSk2di10lPjrgmOT
\r
32 W6QPM8hNU82z7E67OzLnaxYTXtmoIPD76LuJ3cKS6+B1mAVmvlBotl+IRkFjuY/XmGc7
\r
33 vi68F1RNPyJg34/+wjlAYax0cwu3AB9X2U05BfiEpLH8OBCBszKO8QxZHpMKRCRqsF/X
\r
34 J0ab6VE5Wtf7cFT3+A3pEJHGPlX0jjXNEyZUeAeC5I4Uy4XTGvFryWevZuglK+03HKwL
\r
36 Received: by 10.152.148.34 with SMTP id tp2mr7496752lab.15.1347485266277;
\r
37 Wed, 12 Sep 2012 14:27:46 -0700 (PDT)
\r
38 Received: from localhost (dsl-hkibrasgw4-fe51df00-27.dhcp.inet.fi.
\r
40 by mx.google.com with ESMTPS id o7sm5533688lbg.4.2012.09.12.14.27.44
\r
41 (version=SSLv3 cipher=OTHER); Wed, 12 Sep 2012 14:27:45 -0700 (PDT)
\r
42 From: Jani Nikula <jani@nikula.org>
\r
43 To: notmuch@notmuchmail.org,
\r
44 David Bremner <david@tethera.net>
\r
45 Subject: [PATCH v3 4/9] test: add smoke tests for the date/time parser module
\r
46 Date: Thu, 13 Sep 2012 00:27:21 +0300
\r
48 <24186aafbdcb967b8f66c2390c928f3788ab6cbf.1347484177.git.jani@nikula.org>
\r
49 X-Mailer: git-send-email 1.7.9.5
\r
50 In-Reply-To: <cover.1347484177.git.jani@nikula.org>
\r
51 References: <cover.1347484177.git.jani@nikula.org>
\r
52 In-Reply-To: <cover.1347484177.git.jani@nikula.org>
\r
53 References: <cover.1347484177.git.jani@nikula.org>
\r
55 ALoCoQkQ13CWvqyYTwGo3LAf7kzAXEGz70/2Q8VdJeUHlB9i3WWIc1sktvPUUOnDrAqjAe8Rqz3b
\r
56 X-BeenThere: notmuch@notmuchmail.org
\r
57 X-Mailman-Version: 2.1.13
\r
59 List-Id: "Use and development of the notmuch mail system."
\r
60 <notmuch.notmuchmail.org>
\r
61 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
62 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
63 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
64 List-Post: <mailto:notmuch@notmuchmail.org>
\r
65 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
66 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
67 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
68 X-List-Received-Date: Wed, 12 Sep 2012 21:27:54 -0000
\r
70 Test the date/time parser module directly. Just a small sanity test
\r
73 test/notmuch-test | 1 +
\r
74 test/parse-time-string | 26 ++++++++++++++++++++++++++
\r
75 2 files changed, 27 insertions(+)
\r
76 create mode 100755 test/parse-time-string
\r
78 diff --git a/test/notmuch-test b/test/notmuch-test
\r
79 index cc732c3..7eadfdf 100755
\r
80 --- a/test/notmuch-test
\r
81 +++ b/test/notmuch-test
\r
82 @@ -60,6 +60,7 @@ TESTS="
\r
88 TESTS=${NOTMUCH_TESTS:=$TESTS}
\r
90 diff --git a/test/parse-time-string b/test/parse-time-string
\r
91 new file mode 100755
\r
92 index 0000000..34b80d7
\r
94 +++ b/test/parse-time-string
\r
96 +#!/usr/bin/env bash
\r
97 +test_description="date/time parser module"
\r
100 +# This is currently just a quick sanity/smoke test.
\r
109 + ${TEST_DIRECTORY}/parse-time --format=%s "$*"
\r
112 +test_begin_subtest "date(1) default format without TZ code"
\r
113 +test_expect_equal "$(_parse_time Fri Aug 3 23:06:06 2012)" "$(_date Fri Aug 3 23:06:06 2012)"
\r
115 +test_begin_subtest "date(1) --rfc-2822 format"
\r
116 +test_expect_equal "$(_parse_time Fri, 03 Aug 2012 23:07:46 +0100)" "$(_date Fri, 03 Aug 2012 23:07:46 +0100)"
\r
118 +test_begin_subtest "date(1) --rfc=3339=seconds format"
\r
119 +test_expect_equal "$(_parse_time 2012-08-03 23:09:37+03:00)" "$(_date 2012-08-03 23:09:37+03:00)"
\r