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 BF822431FAF
\r
6 for <notmuch@notmuchmail.org>; Tue, 5 Jun 2012 08:42:58 -0700 (PDT)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\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 bHsOT2NLOnpw for <notmuch@notmuchmail.org>;
\r
16 Tue, 5 Jun 2012 08:42:57 -0700 (PDT)
\r
17 Received: from mail-lb0-f181.google.com (mail-lb0-f181.google.com
\r
18 [209.85.217.181]) (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 AEC9F431FAE
\r
21 for <notmuch@notmuchmail.org>; Tue, 5 Jun 2012 08:42:56 -0700 (PDT)
\r
22 Received: by lbbgk8 with SMTP id gk8so4532415lbb.26
\r
23 for <notmuch@notmuchmail.org>; Tue, 05 Jun 2012 08:42:54 -0700 (PDT)
\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:subject:date:message-id:x-mailer:x-gm-message-state;
\r
27 bh=60q7E+CwrVM2+pSOslUpoCU/psjblf3iHWr1Fq0eQkI=;
\r
28 b=lOlNNUAlaIv9/kK3sdUpFkpsfmh+FSZS7lBCaI719FqsmSKSIjllJnWI/VxCRn3Fza
\r
29 2M5KlKgrabtFpOK6gTQsEuGLrfge74Poy+oBwW/s92zhqHwG91YPKEOyTe5e8rTY7eYs
\r
30 uMZgKB/zgf9GJM0kfnhi0tc1RNMysxi7OC2AhrZY2MmvdZMcKQ+p+jlTb7v5bZxlLE+5
\r
31 4Otor2kJekRmKpKyWz2omZsR40GcZBtq+jfv/PRi3TtfkaunpqQMoBVmhsXfzCZh+JbN
\r
32 c9YYuYsElJwlxQjMClT93fL79Aom7gnUjfkWjzEh5GD1QrrRgdeuGb0GituvuhBo1dYB
\r
34 Received: by 10.152.106.12 with SMTP id gq12mr8855160lab.17.1338910974892;
\r
35 Tue, 05 Jun 2012 08:42:54 -0700 (PDT)
\r
36 Received: from localhost (dsl-hkibrasgw4-fe50dc00-68.dhcp.inet.fi.
\r
38 by mx.google.com with ESMTPS id gt19sm3128217lab.17.2012.06.05.08.42.53
\r
39 (version=SSLv3 cipher=OTHER); Tue, 05 Jun 2012 08:42:54 -0700 (PDT)
\r
40 From: Jani Nikula <jani@nikula.org>
\r
41 To: notmuch@notmuchmail.org
\r
42 Subject: [PATCH 1/2] test: add test for emacs notmuch-show-strip-re function
\r
43 Date: Tue, 5 Jun 2012 18:42:50 +0300
\r
45 <3a9ce3cd2074e311f86f3e416644b2879516ffbf.1338910938.git.jani@nikula.org>
\r
46 X-Mailer: git-send-email 1.7.9.5
\r
48 ALoCoQmYU1HcriHIozAPV0yUoXOeANx3vCzFSyCjv96ZqmQcpDJXguxThDo6yvYnXReJbTmGdXwV
\r
49 X-BeenThere: notmuch@notmuchmail.org
\r
50 X-Mailman-Version: 2.1.13
\r
52 List-Id: "Use and development of the notmuch mail system."
\r
53 <notmuch.notmuchmail.org>
\r
54 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
55 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
56 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
57 List-Post: <mailto:notmuch@notmuchmail.org>
\r
58 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
59 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
60 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
61 X-List-Received-Date: Tue, 05 Jun 2012 15:42:58 -0000
\r
63 The function is used for stripping "re:" from subjects to generate
\r
64 "bare subjects". Include broken test for having "re:" in the middle of
\r
67 test/emacs-show | 13 +++++++++++++
\r
68 1 file changed, 13 insertions(+)
\r
70 diff --git a/test/emacs-show b/test/emacs-show
\r
71 index 2498564..1ddb28e 100755
\r
72 --- a/test/emacs-show
\r
73 +++ b/test/emacs-show
\r
74 @@ -24,4 +24,17 @@ test_emacs "(notmuch-show \"id:$message_id\")
\r
75 (test-visible-output)"
\r
76 test_expect_equal_file OUTPUT EXPECTED
\r
78 +test_begin_subtest "Bare subject #1"
\r
79 +output=$(test_emacs '(notmuch-show-strip-re "Re: subject")')
\r
80 +test_expect_equal "$output" '"subject"'
\r
82 +test_begin_subtest "Bare subject #2"
\r
83 +output=$(test_emacs '(notmuch-show-strip-re "re:Re: re: Re: re:subject")')
\r
84 +test_expect_equal "$output" '"subject"'
\r
86 +test_begin_subtest "Bare subject #3"
\r
87 +test_subtest_known_broken
\r
88 +output=$(test_emacs '(notmuch-show-strip-re "the cure: fix the regexp")')
\r
89 +test_expect_equal "$output" '"the cure: fix the regexp"'
\r