From: David Edmondson <dme@dme.org>
To: notmuch@notmuchmail.org
Subject: [PATCH 3/4 v2] test: Add test for Original Message hiding at point-min.
Date: Wed, 25 Jan 2012 15:45:27 +0000 [thread overview]
Message-ID: <1327506328-22126-4-git-send-email-dme@dme.org> (raw)
In-Reply-To: <1327506328-22126-1-git-send-email-dme@dme.org>
---
test/emacs-original-message-hiding.el | 15 +++++++++++++++
test/emacs-original-message-hiding.sh | 20 ++++++++++++++++++++
test/notmuch-test | 1 +
3 files changed, 36 insertions(+), 0 deletions(-)
create mode 100644 test/emacs-original-message-hiding.el
create mode 100755 test/emacs-original-message-hiding.sh
diff --git a/test/emacs-original-message-hiding.el b/test/emacs-original-message-hiding.el
new file mode 100644
index 0000000..bbacbeb
--- /dev/null
+++ b/test/emacs-original-message-hiding.el
@@ -0,0 +1,15 @@
+(defun notmuch-test-original-message-hiding ()
+ (let ((notmuch-show-insert-text/plain-hook '(notmuch-wash-excerpt-citations))
+ (expected "\
+Sender <sender@example.com> (2010-01-05) (inbox)
+Subject: hiding an Original Message
+To: mailinglist@notmuchmail.org
+Date: Tue, 05 Jan 2010 15:43:56 -0000
+
+[ 2-line hidden original message. Click/Enter to show. ]
+
+")
+ output)
+ (notmuch-show "id:\"test_message@test.org\"")
+ (setq output (visible-buffer-string))
+ (notmuch-test-expect-equal output expected)))
diff --git a/test/emacs-original-message-hiding.sh b/test/emacs-original-message-hiding.sh
new file mode 100755
index 0000000..01cf98d
--- /dev/null
+++ b/test/emacs-original-message-hiding.sh
@@ -0,0 +1,20 @@
+#!/usr/bin/env bash
+
+test_description="emacs Original Message hiding"
+. test-lib.sh
+
+test_begin_subtest "Hiding an Original Message region at point-min"
+add_message \
+ '[id]="test_message@test.org"' \
+ '[from]="Sender <sender@example.com>"' \
+ '[to]=mailinglist@notmuchmail.org' \
+ '[subject]="hiding an Original Message"' \
+ '[date]="Tue, 05 Jan 2010 15:43:56 -0000"' \
+ '[body]="-----Original Message-----
+Text here.
+"'
+test_subtest_known_broken
+test_emacs_expect_t \
+ '(load "emacs-original-message-hiding.el") (notmuch-test-original-message-hiding)'
+
+test_done
diff --git a/test/notmuch-test b/test/notmuch-test
index 3f1740c..af132fc 100755
--- a/test/notmuch-test
+++ b/test/notmuch-test
@@ -54,6 +54,7 @@ TESTS="
argument-parsing
emacs-test-functions.sh
emacs-address-cleaning.sh
+ emacs-original-message-hiding.sh
"
TESTS=${NOTMUCH_TESTS:=$TESTS}
--
1.7.8.3
next prev parent reply other threads:[~2012-01-25 15:45 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-25 15:05 [PATCH 1/1] emacs: Take more care when hiding regions with buttons David Edmondson
2012-01-25 15:10 ` Dmitry Kurochkin
2012-01-25 15:18 ` David Edmondson
2012-01-25 15:45 ` [PATCH 0/4 v2] " David Edmondson
2012-01-25 15:45 ` [PATCH 1/4 v2] test: `visible-buffer-substring' should not return text properties David Edmondson
2012-01-25 17:35 ` Dmitry Kurochkin
2012-01-25 15:45 ` [PATCH 2/4 v2] test: `notmuch-test-run' should protect against buffer switching David Edmondson
2012-01-25 17:36 ` Dmitry Kurochkin
2012-01-25 15:45 ` David Edmondson [this message]
2012-01-25 17:53 ` [PATCH 3/4 v2] test: Add test for Original Message hiding at point-min Dmitry Kurochkin
2012-01-26 7:22 ` David Edmondson
2012-01-25 15:45 ` [PATCH 4/4 v2] emacs: Take more care when hiding regions with buttons David Edmondson
2012-01-25 17:53 ` Dmitry Kurochkin
2012-01-26 7:19 ` [PATCH 0/4 v3] " David Edmondson
2012-01-26 7:19 ` [PATCH 1/4 v3] test: `visible-buffer-substring' should not return text properties David Edmondson
2012-01-26 7:19 ` [PATCH 2/4 v3] test: `notmuch-test-run' should protect against buffer switching David Edmondson
2012-01-26 7:19 ` [PATCH 3/4 v3] test: Add test for Original Message hiding at point-min David Edmondson
2012-01-26 7:19 ` [PATCH 4/4 v3] emacs: Take more care when hiding regions with buttons David Edmondson
2012-01-26 12:40 ` [PATCH 0/4 v3] " David Bremner
2012-01-30 12:27 ` Dmitry Kurochkin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://notmuchmail.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1327506328-22126-4-git-send-email-dme@dme.org \
--to=dme@dme.org \
--cc=notmuch@notmuchmail.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://yhetil.org/notmuch.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).