[PATCH v2 2/7] test: emacs: new tests "notmuch-show: {, un}collapse all messages in thread"
Pieter Praet
pieter at praet.org
Wed Feb 22 10:43:29 PST 2012
* test/emacs:
- New subtest "notmuch-show: collapse all messages in thread":
`notmuch-show-open-or-close-all' with prefix arg ("C-u M-RET")
collapses all messages in thread.
- New subtest "notmuch-show: uncollapse all messages in thread":
`notmuch-show-open-or-close-all' without prefix arg ("M-RET")
uncollapses all messages in thread.
---
test/emacs | 13 +++
...notmuch-show-thread-with-all-messages-collapsed | 4 +
...tmuch-show-thread-with-all-messages-uncollapsed | 79 ++++++++++++++++++++
3 files changed, 96 insertions(+), 0 deletions(-)
create mode 100644 test/emacs.expected-output/notmuch-show-thread-with-all-messages-collapsed
create mode 100644 test/emacs.expected-output/notmuch-show-thread-with-all-messages-uncollapsed
diff --git a/test/emacs b/test/emacs
index f9ea1c3..7d6e6ee 100755
--- a/test/emacs
+++ b/test/emacs
@@ -408,6 +408,19 @@ test_emacs \
(test-visible-output))'
test_expect_equal_file OUTPUT $EXPECTED/notmuch-show-message-with-headers-hidden
+test_begin_subtest "notmuch-show: collapse all messages in thread"
+test_emacs '(notmuch-show "id:f35dbb950911171435ieecd458o853c873e35f4be95 at mail.gmail.com")
+ (let ((current-prefix-arg t))
+ (notmuch-show-open-or-close-all)
+ (test-visible-output))'
+test_expect_equal_file OUTPUT $EXPECTED/notmuch-show-thread-with-all-messages-collapsed
+
+test_begin_subtest "notmuch-show: uncollapse all messages in thread"
+test_emacs '(notmuch-show "id:f35dbb950911171435ieecd458o853c873e35f4be95 at mail.gmail.com")
+ (notmuch-show-open-or-close-all)
+ (test-visible-output)'
+test_expect_equal_file OUTPUT $EXPECTED/notmuch-show-thread-with-all-messages-uncollapsed
+
test_begin_subtest "Stashing in notmuch-show"
add_message '[date]="Sat, 01 Jan 2000 12:00:00 -0000"' \
'[from]="Some One <someone at somewhere.org>"' \
diff --git a/test/emacs.expected-output/notmuch-show-thread-with-all-messages-collapsed b/test/emacs.expected-output/notmuch-show-thread-with-all-messages-collapsed
new file mode 100644
index 0000000..73b0e60
--- /dev/null
+++ b/test/emacs.expected-output/notmuch-show-thread-with-all-messages-collapsed
@@ -0,0 +1,4 @@
+Jan Janak <jan at ryngle.com> (2009-11-17) (inbox)
+Subject: [notmuch] What a great idea!
+ Jan Janak <jan at ryngle.com> (2009-11-17) (inbox)
+ Carl Worth <cworth at cworth.org> (2009-11-18) (inbox unread)
diff --git a/test/emacs.expected-output/notmuch-show-thread-with-all-messages-uncollapsed b/test/emacs.expected-output/notmuch-show-thread-with-all-messages-uncollapsed
new file mode 100644
index 0000000..bd5598e
--- /dev/null
+++ b/test/emacs.expected-output/notmuch-show-thread-with-all-messages-uncollapsed
@@ -0,0 +1,79 @@
+Jan Janak <jan at ryngle.com> (2009-11-17) (inbox)
+Subject: [notmuch] What a great idea!
+To: notmuch at notmuchmail.org
+Date: Tue, 17 Nov 2009 23:35:30 +0100
+
+Hello,
+
+First of all, notmuch is a wonderful idea, both the cmdline tool and
+the emacs interface! Thanks a lot for writing it, I was really excited
+when I read the announcement today.
+
+Have you considered sending an announcement to the org-mode mailing list?
+http://org-mode.org
+
+Various ways of searching/referencing emails from emacs were discussed
+there several times and none of them were as elegant as notmuch (not
+even close). Maybe notmuch would attract some of the developers
+there..
+
+ -- Jan
+ Jan Janak <jan at ryngle.com> (2009-11-17) (inbox)
+ Subject: [notmuch] What a great idea!
+ To: notmuch at notmuchmail.org
+ Date: Tue, 17 Nov 2009 23:38:47 +0100
+
+ On Tue, Nov 17, 2009 at 11:35 PM, Jan Janak <jan at ryngle.com> wrote:
+ > Hello,
+ >
+ > First of all, notmuch is a wonderful idea, both the cmdline tool and
+ [ 2 more citation lines. Click/Enter to show. ]
+ >
+ > Have you considered sending an announcement to the org-mode mailing list?
+ > http://org-mode.org
+
+ Sorry, wrong URL, the correct one is: http://orgmode.org
+
+ > Various ways of searching/referencing emails from emacs were discussed
+ > there several times and none of them were as elegant as notmuch (not
+ > even close). Maybe notmuch would attract some of the developers
+ > there..
+
+ -- Jan
+ Carl Worth <cworth at cworth.org> (2009-11-18) (inbox unread)
+ Subject: [notmuch] What a great idea!
+ To: notmuch at notmuchmail.org
+ Date: Wed, 18 Nov 2009 02:49:52 -0800
+
+ On Tue, 17 Nov 2009 23:35:30 +0100, Jan Janak <jan at ryngle.com> wrote:
+ > First of all, notmuch is a wonderful idea, both the cmdline tool and
+ > the emacs interface! Thanks a lot for writing it, I was really excited
+ > when I read the announcement today.
+
+ Ah, here's where I planned a nice welcome. So welcome (again), Jan! :-)
+
+ I've been having a lot of fun with notmuch already, (though there have
+ been some days of pain before it was functional enough and my
+ email-reply latency went way up). But regardless---I got through that,
+ and I'm able to work more efficiently with notmuch now than I could with
+ sup before. So I'm happy.
+
+ And I'm delighted when other people find this interesting as well.
+
+ > Have you considered sending an announcement to the org-mode mailing list?
+ > http://orgmode.org
+
+ Thanks for the idea. I think I may have looked into org-mode years ago,
+ (when I was investigating planner-mode and various emacs "personal wiki"
+ systems for keeping random notes and what-not).
+
+ > Various ways of searching/referencing emails from emacs were discussed
+ > there several times and none of them were as elegant as notmuch (not
+ > even close). Maybe notmuch would attract some of the developers
+ > there..
+
+ Yeah. I'll drop them a mail. Having a real emacs wizard on board would
+ be nice. (I'm afraid the elisp I've written so far for this project is
+ fairly grim.)
+
+ -Carl
--
1.7.8.1
More information about the notmuch
mailing list