unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
blob 830cefaf67167a99e3474829e9926730d290c8ed 1493 bytes (raw)
name: test/T465-emacs-unthreaded.sh 	 # note: path name is non-authoritative(*)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
 
#!/usr/bin/env bash

test_description="emacs unthreaded interface"
. $(dirname "$0")/test-lib.sh || exit 1
. $NOTMUCH_SRCDIR/test/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%43s(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%43s(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)"
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_begin_subtest "notmuch-unthreaded with nonexistent CWD"
test_emacs '(test-log-error
	      (let ((default-directory "/nonexistent"))
	        (notmuch-unthreaded "*")))'
test_expect_equal "$(cat MESSAGES)" "COMPLETE"

test_done

debug log:

solving 830cefaf ...
found 830cefaf in https://yhetil.org/notmuch/20210829192335.4192305-10-david@tethera.net/
found f9a09426 in https://yhetil.org/notmuch.git/
preparing index
index prepared:
100755 f9a0942620018c36892b1c0d11df1c355dc9e495	test/T465-emacs-unthreaded.sh

applying [1/1] https://yhetil.org/notmuch/20210829192335.4192305-10-david@tethera.net/
diff --git a/test/T465-emacs-unthreaded.sh b/test/T465-emacs-unthreaded.sh
index f9a09426..830cefaf 100755

Checking patch test/T465-emacs-unthreaded.sh...
Applied patch test/T465-emacs-unthreaded.sh cleanly.

index at:
100755 830cefaf67167a99e3474829e9926730d290c8ed	test/T465-emacs-unthreaded.sh

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

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).