From: David Bremner <david@tethera.net>
To: notmuch@notmuchmail.org
Cc: David Bremner <david@tethera.net>
Subject: [PATCH 1/3] test: start test file for emacs unthreaded view.
Date: Thu, 3 Jun 2021 08:54:58 -0300 [thread overview]
Message-ID: <20210603115500.987504-2-david@tethera.net> (raw)
In-Reply-To: <20210603115500.987504-1-david@tethera.net>
Initial focus is on behaviour with large threads.
The second test replicates a bug reported by Alan Schmitt in
id:87lf7sojbq.fsf@m4x.org.
---
test/T465-emacs-unthreaded.sh | 40 +++++++++++++++++++++++++++++++++++
1 file changed, 40 insertions(+)
create mode 100755 test/T465-emacs-unthreaded.sh
diff --git a/test/T465-emacs-unthreaded.sh b/test/T465-emacs-unthreaded.sh
new file mode 100755
index 00000000..f9abcebd
--- /dev/null
+++ b/test/T465-emacs-unthreaded.sh
@@ -0,0 +1,40 @@
+#!/usr/bin/env bash
+
+test_description="emacs unthreaded interface"
+. $(dirname "$0")/test-lib.sh || exit 1
+. $(dirname "$0")/test-lib-emacs.sh || exit 1
+
+test_require_emacs
+
+generate_message "[id]=large-thread-1" '[subject]="large thread"'
+printf " 2001-01-05 Notmuch Test Suite large thread (inbox unread)\n" \
+ >> EXPECTED.unthreaded
+
+for num in $(seq 2 64); do
+ prev=$((num - 1))
+ generate_message '[subject]="large thread"' "[id]=large-thread-$num" "[in-reply-to]=\<large-thread-$prev\>"
+ printf " 2001-01-05 Notmuch Test Suite large thread (inbox unread)\n" \
+ >> EXPECTED.unthreaded
+done
+printf "End of search results.\n" >> EXPECTED.unthreaded
+
+notmuch new > new.output 2>&1
+
+test_begin_subtest "large thread"
+test_emacs '(let ((max-lisp-eval-depth 10))
+ (notmuch-unthreaded "subject:large-thread")
+ (notmuch-test-wait)
+ (test-output))'
+test_expect_equal_file EXPECTED.unthreaded OUTPUT
+
+test_begin_subtest "message from large thread (status)"
+test_subtest_known_broken
+output=$(test_emacs '(let ((max-lisp-eval-depth 10))
+ (notmuch-unthreaded "subject:large-thread")
+ (notmuch-test-wait)
+ (notmuch-tree-show-message nil)
+ (notmuch-test-wait)
+ "SUCCESS")' )
+test_expect_equal "$output" '"SUCCESS"'
+
+test_done
--
2.30.2
next prev parent reply other threads:[~2021-06-03 11:55 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-03 11:54 Handle long threads in unthreaded-view David Bremner
2021-06-03 11:54 ` David Bremner [this message]
2021-06-03 11:54 ` [PATCH 2/3] emacs/show: add parameter notmuch-show-single-message David Bremner
2021-06-03 11:55 ` [PATCH 3/3] emacs/tree use notmuch-show-single-message David Bremner
[not found] <20210626120428.153445-1-david@tethera.net>
2021-06-26 12:04 ` [PATCH 1/3] test: start test file for emacs unthreaded view David Bremner
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=20210603115500.987504-2-david@tethera.net \
--to=david@tethera.net \
--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).