Re: [PATCH 3/5] nmbug-status: Add an nmbug-status(5) man page
[notmuch-archives.git] / 79 / 28dbf626f0e0b8371b62f6f3ba5ba56052c630
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 1178F431FAF\r
6         for <notmuch@notmuchmail.org>; Fri, 30 Nov 2012 13:59:36 -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.7\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5\r
12         tests=[RCVD_IN_DNSWL_LOW=-0.7] 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 zWuFI4D6qiah for <notmuch@notmuchmail.org>;\r
16         Fri, 30 Nov 2012 13:59:31 -0800 (PST)\r
17 Received: from mail-la0-f53.google.com (mail-la0-f53.google.com\r
18         [209.85.215.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
19         (No client certificate requested)\r
20         by olra.theworths.org (Postfix) with ESMTPS id EF348431FAE\r
21         for <notmuch@notmuchmail.org>; Fri, 30 Nov 2012 13:59:30 -0800 (PST)\r
22 Received: by mail-la0-f53.google.com with SMTP id w12so799167lag.26\r
23         for <notmuch@notmuchmail.org>; Fri, 30 Nov 2012 13:59:29 -0800 (PST)\r
24 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\r
25         d=google.com; s=20120113;\r
26         h=from:to:cc:subject:in-reply-to:references:user-agent:date\r
27         :message-id:mime-version:content-type:x-gm-message-state;\r
28         bh=C7klUEBgHJMuPxGWCmwVUBXmJtfDVirNMdsVZDAKAB4=;\r
29         b=lOBdLFGYzdpJ1ICE2JEkCj6s27v7/Ar1yAignz6JsF7Bb8HPDIkFWX4NiKtno3JQNi\r
30         Qdif41Jo8EIbiaGDHbGUqR5vy+ChP71hdH0TGAoecuSzVe20e5pnXmeqbCjjS8uZpOMd\r
31         5GgFLvE9/eanyIEnEliP9Lv30ES/CwyFfeFsBKE5DEB5zOmlhtYrw6lu+6ofryOwd8g6\r
32         21YqexXhqhOR8JYjydreZhMP4WmGoXKJTHJbAV89LHnlZ7sl0mULN3kYAQr1GMzoWVmq\r
33         fbcas4K6XxCqFHsBwczU4zZQ8yWHQk95E5ZBUE11804WGyq0vGn2sAABFGZMbYmu1hyf\r
34         MiGg==\r
35 Received: by 10.112.13.140 with SMTP id h12mr1464105lbc.12.1354312769409;\r
36         Fri, 30 Nov 2012 13:59:29 -0800 (PST)\r
37 Received: from localhost (dsl-hkibrasgw4-fe51df00-27.dhcp.inet.fi.\r
38         [80.223.81.27])\r
39         by mx.google.com with ESMTPS id b4sm2533774lbi.0.2012.11.30.13.59.27\r
40         (version=SSLv3 cipher=OTHER); Fri, 30 Nov 2012 13:59:28 -0800 (PST)\r
41 From: Jani Nikula <jani@nikula.org>\r
42 To: david@tethera.net, notmuch@notmuchmail.org\r
43 Subject: Re: [Patch v2 03/17] test/hex-escaping: new test for hex escaping\r
44         routines\r
45 In-Reply-To: <1353792017-31459-4-git-send-email-david@tethera.net>\r
46 References: <1353792017-31459-1-git-send-email-david@tethera.net>\r
47         <1353792017-31459-4-git-send-email-david@tethera.net>\r
48 User-Agent: Notmuch/0.14+124~g3b17402 (http://notmuchmail.org) Emacs/23.4.1\r
49         (i686-pc-linux-gnu)\r
50 Date: Fri, 30 Nov 2012 23:59:26 +0200\r
51 Message-ID: <87r4naiwg1.fsf@nikula.org>\r
52 MIME-Version: 1.0\r
53 Content-Type: text/plain; charset=us-ascii\r
54 X-Gm-Message-State:\r
55  ALoCoQmvI+T/4ShnAZuUvcT9xzRwFnw/TqlBr68H+urWJ8DTgF1PJi54l+xmzoMSBqusgBowiYJP\r
56 Cc: David Bremner <bremner@debian.org>\r
57 X-BeenThere: notmuch@notmuchmail.org\r
58 X-Mailman-Version: 2.1.13\r
59 Precedence: list\r
60 List-Id: "Use and development of the notmuch mail system."\r
61         <notmuch.notmuchmail.org>\r
62 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
63         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
64 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
65 List-Post: <mailto:notmuch@notmuchmail.org>\r
66 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
67 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
68         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
69 X-List-Received-Date: Fri, 30 Nov 2012 21:59:36 -0000\r
70 \r
71 On Sat, 24 Nov 2012, david@tethera.net wrote:\r
72 > From: David Bremner <bremner@debian.org>\r
73 >\r
74 > These are more like unit tests, to (try to) make sure the library\r
75 > functionality is working before building more complicated things on\r
76 > top of it.\r
77 \r
78 LGTM.\r
79 \r
80 Here I observe that 'hex-xcode encode' and 'hex-xcode decode' might be a\r
81 better fit than --direction. But this isn't of importance.\r
82 \r
83 BR,\r
84 Jani.\r
85 \r
86 \r
87 > ---\r
88 >  test/hex-escaping |   26 ++++++++++++++++++++++++++\r
89 >  test/notmuch-test |    1 +\r
90 >  2 files changed, 27 insertions(+)\r
91 >  create mode 100755 test/hex-escaping\r
92 >\r
93 > diff --git a/test/hex-escaping b/test/hex-escaping\r
94 > new file mode 100755\r
95 > index 0000000..f34cc8c\r
96 > --- /dev/null\r
97 > +++ b/test/hex-escaping\r
98 > @@ -0,0 +1,26 @@\r
99 > +#!/usr/bin/env bash\r
100 > +test_description="hex encoding and decoding"\r
101 > +. ./test-lib.sh\r
102 > +\r
103 > +test_begin_subtest "round trip"\r
104 > +find $TEST_DIRECTORY/corpus -type f -print | sort | xargs cat > EXPECTED\r
105 > +$TEST_DIRECTORY/hex-xcode --direction=encode < EXPECTED | $TEST_DIRECTORY/hex-xcode --direction=decode > OUTPUT\r
106 > +test_expect_equal_file OUTPUT EXPECTED\r
107 > +\r
108 > +test_begin_subtest "punctuation"\r
109 > +tag1='comic_swear=$&^%$^%\\//-+$^%$'\r
110 > +tag_enc1=$($TEST_DIRECTORY/hex-xcode --direction=encode "$tag1")\r
111 > +test_expect_equal "$tag_enc1" "comic_swear=%24%26%5e%25%24%5e%25%5c%5c%2f%2f-+%24%5e%25%24"\r
112 > +\r
113 > +test_begin_subtest "round trip newlines"\r
114 > +printf 'this\n tag\t has\n spaces\n' > EXPECTED.$test_count\r
115 > +$TEST_DIRECTORY/hex-xcode --direction=encode  < EXPECTED.$test_count |\\r
116 > +     $TEST_DIRECTORY/hex-xcode --direction=decode > OUTPUT.$test_count\r
117 > +test_expect_equal_file EXPECTED.$test_count OUTPUT.$test_count\r
118 > +\r
119 > +test_begin_subtest "round trip 8bit chars"\r
120 > +echo '%c3%91%c3%a5%c3%b0%c3%a3%c3%a5%c3%a9-%c3%8f%c3%8a' > EXPECTED.$test_count\r
121 > +$TEST_DIRECTORY/hex-xcode --direction=decode  < EXPECTED.$test_count |\\r
122 > +     $TEST_DIRECTORY/hex-xcode --direction=encode > OUTPUT.$test_count\r
123 > +test_expect_equal_file EXPECTED.$test_count OUTPUT.$test_count\r
124 > +test_done\r
125 > diff --git a/test/notmuch-test b/test/notmuch-test\r
126 > index 9a1b375..d2e90e2 100755\r
127 > --- a/test/notmuch-test\r
128 > +++ b/test/notmuch-test\r
129 > @@ -60,6 +60,7 @@ TESTS="\r
130 >    emacs-hello\r
131 >    emacs-show\r
132 >    missing-headers\r
133 > +  hex-escaping\r
134 >    parse-time-string\r
135 >    search-date\r
136 >  "\r
137 > -- \r
138 > 1.7.10.4\r
139 >\r
140 > _______________________________________________\r
141 > notmuch mailing list\r
142 > notmuch@notmuchmail.org\r
143 > http://notmuchmail.org/mailman/listinfo/notmuch\r