[PATCH 1/2] test: add test for emacs notmuch-show-strip-re function
authorJani Nikula <jani@nikula.org>
Tue, 5 Jun 2012 15:42:50 +0000 (18:42 +0300)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:47:37 +0000 (09:47 -0800)
97/80e0b149c525cb4c41af9d585c12d8aff60ac3 [new file with mode: 0644]

diff --git a/97/80e0b149c525cb4c41af9d585c12d8aff60ac3 b/97/80e0b149c525cb4c41af9d585c12d8aff60ac3
new file mode 100644 (file)
index 0000000..ad54d0b
--- /dev/null
@@ -0,0 +1,94 @@
+Return-Path: <jani@nikula.org>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id BF822431FAF\r
+       for <notmuch@notmuchmail.org>; Tue,  5 Jun 2012 08:42:58 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.7\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5\r
+       tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+       with ESMTP id bHsOT2NLOnpw for <notmuch@notmuchmail.org>;\r
+       Tue,  5 Jun 2012 08:42:57 -0700 (PDT)\r
+Received: from mail-lb0-f181.google.com (mail-lb0-f181.google.com\r
+       [209.85.217.181]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
+       (No client certificate requested)\r
+       by olra.theworths.org (Postfix) with ESMTPS id AEC9F431FAE\r
+       for <notmuch@notmuchmail.org>; Tue,  5 Jun 2012 08:42:56 -0700 (PDT)\r
+Received: by lbbgk8 with SMTP id gk8so4532415lbb.26\r
+       for <notmuch@notmuchmail.org>; Tue, 05 Jun 2012 08:42:54 -0700 (PDT)\r
+X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\r
+       d=google.com; s=20120113;\r
+       h=from:to:subject:date:message-id:x-mailer:x-gm-message-state;\r
+       bh=60q7E+CwrVM2+pSOslUpoCU/psjblf3iHWr1Fq0eQkI=;\r
+       b=lOlNNUAlaIv9/kK3sdUpFkpsfmh+FSZS7lBCaI719FqsmSKSIjllJnWI/VxCRn3Fza\r
+       2M5KlKgrabtFpOK6gTQsEuGLrfge74Poy+oBwW/s92zhqHwG91YPKEOyTe5e8rTY7eYs\r
+       uMZgKB/zgf9GJM0kfnhi0tc1RNMysxi7OC2AhrZY2MmvdZMcKQ+p+jlTb7v5bZxlLE+5\r
+       4Otor2kJekRmKpKyWz2omZsR40GcZBtq+jfv/PRi3TtfkaunpqQMoBVmhsXfzCZh+JbN\r
+       c9YYuYsElJwlxQjMClT93fL79Aom7gnUjfkWjzEh5GD1QrrRgdeuGb0GituvuhBo1dYB\r
+       Q1HQ==\r
+Received: by 10.152.106.12 with SMTP id gq12mr8855160lab.17.1338910974892;\r
+       Tue, 05 Jun 2012 08:42:54 -0700 (PDT)\r
+Received: from localhost (dsl-hkibrasgw4-fe50dc00-68.dhcp.inet.fi.\r
+       [80.220.80.68])\r
+       by mx.google.com with ESMTPS id gt19sm3128217lab.17.2012.06.05.08.42.53\r
+       (version=SSLv3 cipher=OTHER); Tue, 05 Jun 2012 08:42:54 -0700 (PDT)\r
+From: Jani Nikula <jani@nikula.org>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH 1/2] test: add test for emacs notmuch-show-strip-re function\r
+Date: Tue,  5 Jun 2012 18:42:50 +0300\r
+Message-Id:\r
+ <3a9ce3cd2074e311f86f3e416644b2879516ffbf.1338910938.git.jani@nikula.org>\r
+X-Mailer: git-send-email 1.7.9.5\r
+X-Gm-Message-State:\r
+ ALoCoQmYU1HcriHIozAPV0yUoXOeANx3vCzFSyCjv96ZqmQcpDJXguxThDo6yvYnXReJbTmGdXwV\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+       <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Tue, 05 Jun 2012 15:42:58 -0000\r
+\r
+The function is used for stripping "re:" from subjects to generate\r
+"bare subjects". Include broken test for having "re:" in the middle of\r
+the subject.\r
+---\r
+ test/emacs-show |   13 +++++++++++++\r
+ 1 file changed, 13 insertions(+)\r
+\r
+diff --git a/test/emacs-show b/test/emacs-show\r
+index 2498564..1ddb28e 100755\r
+--- a/test/emacs-show\r
++++ b/test/emacs-show\r
+@@ -24,4 +24,17 @@ test_emacs "(notmuch-show \"id:$message_id\")\r
+           (test-visible-output)"\r
+ test_expect_equal_file OUTPUT EXPECTED\r
\r
++test_begin_subtest "Bare subject #1"\r
++output=$(test_emacs '(notmuch-show-strip-re "Re: subject")')\r
++test_expect_equal "$output" '"subject"'\r
++\r
++test_begin_subtest "Bare subject #2"\r
++output=$(test_emacs '(notmuch-show-strip-re "re:Re: re:  Re:  re:subject")')\r
++test_expect_equal "$output" '"subject"'\r
++\r
++test_begin_subtest "Bare subject #3"\r
++test_subtest_known_broken\r
++output=$(test_emacs '(notmuch-show-strip-re "the cure: fix the regexp")')\r
++test_expect_equal "$output" '"the cure: fix the regexp"'\r
++\r
+ test_done\r
+-- \r
+1.7.9.5\r
+\r