aboutsummaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
authorGravatar Pieter Praet <pieter@praet.org>2012-02-19 21:56:29 +0100
committerGravatar David Bremner <bremner@debian.org>2012-10-17 21:33:44 -0300
commit5ea1dbe977790294d73d3522228ce1ede58b8404 (patch)
tree033663d0940be473b828820a2fed9ae7e4fe1ee4 /test
parent09d19ac8c0ff9ffc697923a1517eba8215d61961 (diff)
test: emacs: toggle eliding of non-matching messages in `notmuch-show'
See commits 44a544ed, 866ce8b1, 668b66ec.
Diffstat (limited to 'test')
-rwxr-xr-xtest/emacs38
-rw-r--r--test/emacs.expected-output/notmuch-show-elide-non-matching-messages-off79
-rw-r--r--test/emacs.expected-output/notmuch-show-elide-non-matching-messages-on75
3 files changed, 192 insertions, 0 deletions
diff --git a/test/emacs b/test/emacs
index 58ea59a9..c4ead514 100755
--- a/test/emacs
+++ b/test/emacs
@@ -802,5 +802,43 @@ test_emacs '(let ((notmuch-crypto-process-mime nil))
(test-visible-output))'
test_expect_equal_file OUTPUT $EXPECTED/notmuch-show-process-crypto-mime-parts-on
+test_begin_subtest "notmuch-show: don't elide non-matching messages"
+test_emacs '(let ((notmuch-show-only-matching-messages nil))
+ (notmuch-search "from:lars@seas.harvard.edu and subject:\"Maildir storage\"")
+ (notmuch-test-wait)
+ (notmuch-search-show-thread)
+ (notmuch-test-wait)
+ (test-visible-output))'
+test_expect_equal_file OUTPUT $EXPECTED/notmuch-show-elide-non-matching-messages-off
+
+test_begin_subtest "notmuch-show: elide non-matching messages"
+test_emacs '(let ((notmuch-show-only-matching-messages t))
+ (notmuch-search "from:lars@seas.harvard.edu and subject:\"Maildir storage\"")
+ (notmuch-test-wait)
+ (notmuch-search-show-thread)
+ (notmuch-test-wait)
+ (test-visible-output))'
+test_expect_equal_file OUTPUT $EXPECTED/notmuch-show-elide-non-matching-messages-on
+
+test_begin_subtest "notmuch-show: elide non-matching messages (w/ notmuch-show-toggle-elide-non-matching)"
+test_emacs '(let ((notmuch-show-only-matching-messages nil))
+ (notmuch-search "from:lars@seas.harvard.edu and subject:\"Maildir storage\"")
+ (notmuch-test-wait)
+ (notmuch-search-show-thread)
+ (notmuch-test-wait)
+ (notmuch-show-toggle-elide-non-matching)
+ (test-visible-output))'
+test_expect_equal_file OUTPUT $EXPECTED/notmuch-show-elide-non-matching-messages-on
+
+test_begin_subtest "notmuch-show: elide non-matching messages (w/ prefix arg to notmuch-show)"
+test_emacs '(let ((notmuch-show-only-matching-messages nil))
+ (notmuch-search "from:lars@seas.harvard.edu and subject:\"Maildir storage\"")
+ (notmuch-test-wait)
+ (let ((current-prefix-arg t))
+ (notmuch-search-show-thread))
+ (notmuch-test-wait)
+ (test-visible-output))'
+test_expect_equal_file OUTPUT $EXPECTED/notmuch-show-elide-non-matching-messages-on
+
test_done
diff --git a/test/emacs.expected-output/notmuch-show-elide-non-matching-messages-off b/test/emacs.expected-output/notmuch-show-elide-non-matching-messages-off
new file mode 100644
index 00000000..b31fe622
--- /dev/null
+++ b/test/emacs.expected-output/notmuch-show-elide-non-matching-messages-off
@@ -0,0 +1,79 @@
+Lars Kellogg-Stedman <lars@seas.harvard.edu> (2009-11-17) (inbox signed)
+Subject: [notmuch] Working with Maildir storage?
+To: notmuch@notmuchmail.org
+Date: Tue, 17 Nov 2009 14:00:54 -0500
+
+[ multipart/mixed ]
+[ multipart/signed ]
+[ text/plain ]
+I saw the LWN article and decided to take a look at notmuch. I'm
+currently using mutt and mairix to index and read a collection of
+Maildir mail folders (around 40,000 messages total).
+
+notmuch indexed the messages without complaint, but my attempt at
+searching bombed out. Running, for example:
+
+ notmuch search storage
+
+Resulted in 4604 lines of errors along the lines of:
+
+ Error opening
+ /home/lars/Mail/read-messages.2008/cur/1246413773.24928_27334.hostname,U=3026:2,S:
+ Too many open files
+
+I'm curious if this is expected behavior (i.e., notmuch does not work
+with Maildir) or if something else is going on.
+
+Cheers,
+
+[ 4-line signature. Click/Enter to show. ]
+[ application/pgp-signature ]
+[ text/plain ]
+[ 4-line signature. Click/Enter to show. ]
+ Mikhail Gusarov <dottedmag@dottedmag.net> (2009-11-17) (inbox signed unread)
+ Lars Kellogg-Stedman <lars@seas.harvard.edu> (2009-11-17) (inbox signed)
+ Subject: Re: [notmuch] Working with Maildir storage?
+ To: Mikhail Gusarov <dottedmag@dottedmag.net>
+ Cc: notmuch@notmuchmail.org
+ Date: Tue, 17 Nov 2009 15:33:01 -0500
+
+ [ multipart/mixed ]
+ [ multipart/signed ]
+ [ text/plain ]
+ > See the patch just posted here.
+
+ Is the list archived anywhere? The obvious archives
+ (http://notmuchmail.org/pipermail/notmuch/) aren't available, and I
+ think I subscribed too late to get the patch (I only just saw the
+ discussion about it).
+
+ It doesn't look like the patch is in git yet.
+
+ -- Lars
+
+ [ 4-line signature. Click/Enter to show. ]
+ [ application/pgp-signature ]
+ [ text/plain ]
+ [ 4-line signature. Click/Enter to show. ]
+ Mikhail Gusarov <dottedmag@dottedmag.net> (2009-11-17) (inbox unread)
+ Keith Packard <keithp@keithp.com> (2009-11-17) (inbox unread)
+ Lars Kellogg-Stedman <lars@seas.harvard.edu> (2009-11-18) (inbox signed unread)
+ Subject: Re: [notmuch] Working with Maildir storage?
+ To: Keith Packard <keithp@keithp.com>
+ Cc: notmuch@notmuchmail.org
+ Date: Tue, 17 Nov 2009 19:50:40 -0500
+
+ [ multipart/mixed ]
+ [ multipart/signed ]
+ [ text/plain ]
+ > I've also pushed a slightly more complicated (and complete) fix to my
+ > private notmuch repository
+
+ The version of lib/messages.cc in your repo doesn't build because it's
+ missing "#include <stdint.h>" (for the uint32_t on line 466).
+
+ [ 4-line signature. Click/Enter to show. ]
+ [ application/pgp-signature ]
+ [ text/plain ]
+ [ 4-line signature. Click/Enter to show. ]
+ Carl Worth <cworth@cworth.org> (2009-11-18) (inbox unread)
diff --git a/test/emacs.expected-output/notmuch-show-elide-non-matching-messages-on b/test/emacs.expected-output/notmuch-show-elide-non-matching-messages-on
new file mode 100644
index 00000000..bafb479e
--- /dev/null
+++ b/test/emacs.expected-output/notmuch-show-elide-non-matching-messages-on
@@ -0,0 +1,75 @@
+Lars Kellogg-Stedman <lars@seas.harvard.edu> (2009-11-17) (inbox signed)
+Subject: [notmuch] Working with Maildir storage?
+To: notmuch@notmuchmail.org
+Date: Tue, 17 Nov 2009 14:00:54 -0500
+
+[ multipart/mixed ]
+[ multipart/signed ]
+[ text/plain ]
+I saw the LWN article and decided to take a look at notmuch. I'm
+currently using mutt and mairix to index and read a collection of
+Maildir mail folders (around 40,000 messages total).
+
+notmuch indexed the messages without complaint, but my attempt at
+searching bombed out. Running, for example:
+
+ notmuch search storage
+
+Resulted in 4604 lines of errors along the lines of:
+
+ Error opening
+ /home/lars/Mail/read-messages.2008/cur/1246413773.24928_27334.hostname,U=3026:2,S:
+ Too many open files
+
+I'm curious if this is expected behavior (i.e., notmuch does not work
+with Maildir) or if something else is going on.
+
+Cheers,
+
+[ 4-line signature. Click/Enter to show. ]
+[ application/pgp-signature ]
+[ text/plain ]
+[ 4-line signature. Click/Enter to show. ]
+ Lars Kellogg-Stedman <lars@seas.harvard.edu> (2009-11-17) (inbox signed)
+ Subject: Re: [notmuch] Working with Maildir storage?
+ To: Mikhail Gusarov <dottedmag@dottedmag.net>
+ Cc: notmuch@notmuchmail.org
+ Date: Tue, 17 Nov 2009 15:33:01 -0500
+
+ [ multipart/mixed ]
+ [ multipart/signed ]
+ [ text/plain ]
+ > See the patch just posted here.
+
+ Is the list archived anywhere? The obvious archives
+ (http://notmuchmail.org/pipermail/notmuch/) aren't available, and I
+ think I subscribed too late to get the patch (I only just saw the
+ discussion about it).
+
+ It doesn't look like the patch is in git yet.
+
+ -- Lars
+
+ [ 4-line signature. Click/Enter to show. ]
+ [ application/pgp-signature ]
+ [ text/plain ]
+ [ 4-line signature. Click/Enter to show. ]
+ Lars Kellogg-Stedman <lars@seas.harvard.edu> (2009-11-18) (inbox signed unread)
+ Subject: Re: [notmuch] Working with Maildir storage?
+ To: Keith Packard <keithp@keithp.com>
+ Cc: notmuch@notmuchmail.org
+ Date: Tue, 17 Nov 2009 19:50:40 -0500
+
+ [ multipart/mixed ]
+ [ multipart/signed ]
+ [ text/plain ]
+ > I've also pushed a slightly more complicated (and complete) fix to my
+ > private notmuch repository
+
+ The version of lib/messages.cc in your repo doesn't build because it's
+ missing "#include <stdint.h>" (for the uint32_t on line 466).
+
+ [ 4-line signature. Click/Enter to show. ]
+ [ application/pgp-signature ]
+ [ text/plain ]
+ [ 4-line signature. Click/Enter to show. ]