unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
blob acd2e57e697c5699c5b77996e2a824ba02b8f799 3073 bytes (raw)
name: test/T440-emacs-hello.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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
 
#!/usr/bin/env bash

test_description="emacs notmuch-hello view"
. $(dirname "$0")/test-lib.sh || exit 1
. $NOTMUCH_BUILDDIR/test/test-lib-emacs.sh || exit 1

EXPECTED=$NOTMUCH_SRCDIR/test/emacs.expected-output

test_require_emacs
add_email_corpus

test_begin_subtest "User-defined section with inbox tag"
test_emacs "(let ((notmuch-hello-sections
                   (list (lambda () (notmuch-hello-insert-searches
                                     \"Test\" '((\"inbox\" . \"tag:inbox\")))))))
           (notmuch-hello)
           (test-output))"
test_expect_equal_file $EXPECTED/notmuch-hello-new-section OUTPUT

test_begin_subtest "User-defined section with empty, hidden entry"
test_emacs "(let ((notmuch-hello-sections
                   (list (lambda () (notmuch-hello-insert-searches
                                     \"Test-with-empty\"
                                     '((\"inbox\" . \"tag:inbox\")
                                       (\"doesnotexist\" . \"tag:doesnotexist\"))
                                     :hide-empty-searches t)))))
             (notmuch-hello)
             (test-output))"
test_expect_equal_file $EXPECTED/notmuch-hello-section-with-empty OUTPUT

test_begin_subtest "User-defined section, unread tag filtered out"
test_emacs "(let ((notmuch-hello-sections
                   (list (lambda () (notmuch-hello-insert-tags-section
                                     \"Test-with-filtered\"
                                     :hide-tags '(\"unread\"))))))
             (notmuch-hello)
             (test-output))"
test_expect_equal_file $EXPECTED/notmuch-hello-section-hidden-tag OUTPUT

test_begin_subtest "User-defined section, different query for counts"
test_emacs "(let ((notmuch-hello-sections
                   (list (lambda () (notmuch-hello-insert-tags-section
                                     \"Test-with-counts\"
                                     :filter-count \"tag:signed\")))))
             (notmuch-hello)
             (test-output))"
test_expect_equal_file $EXPECTED/notmuch-hello-section-counts OUTPUT

test_begin_subtest "Empty custom tags section"
test_emacs "(let* ((widget (widget-create 'notmuch-hello-tags-section))
                   (notmuch-hello-sections (list (widget-value widget))))
             (notmuch-hello)
             (test-output))"
test_expect_equal_file $EXPECTED/notmuch-hello-empty-custom-tags-section OUTPUT

test_begin_subtest "Empty custom queries section"
test_emacs "(let* ((widget (widget-create 'notmuch-hello-query-section))
                   (notmuch-hello-sections (list (widget-value widget))))
             (notmuch-hello)
             (test-output))"
test_expect_equal_file $EXPECTED/notmuch-hello-empty-custom-queries-section OUTPUT

test_begin_subtest "Column alignment for tag/queries with long names"
tag=a-very-long-tag # length carefully calculated for 80 characters window width
notmuch tag +$tag '*'
test_emacs '(notmuch-hello)
            (test-output)'
notmuch tag -$tag '*'
test_expect_equal_file $EXPECTED/notmuch-hello-long-names OUTPUT

test_done

debug log:

solving acd2e57e ...
found acd2e57e in https://yhetil.org/notmuch/20210522152741.27213-1-tomi.ollila@iki.fi/ ||
	https://yhetil.org/notmuch/20210523073443.11618-1-tomi.ollila@iki.fi/
found 642aa3cc in https://yhetil.org/notmuch.git/
preparing index
index prepared:
100755 642aa3cc3b677609c63d056afaec31dc391bfe86	test/T440-emacs-hello.sh

applying [1/1] https://yhetil.org/notmuch/20210522152741.27213-1-tomi.ollila@iki.fi/
diff --git a/test/T440-emacs-hello.sh b/test/T440-emacs-hello.sh
index 642aa3cc..acd2e57e 100755

Checking patch test/T440-emacs-hello.sh...
Applied patch test/T440-emacs-hello.sh cleanly.

skipping https://yhetil.org/notmuch/20210523073443.11618-1-tomi.ollila@iki.fi/ for acd2e57e
index at:
100755 acd2e57e697c5699c5b77996e2a824ba02b8f799	test/T440-emacs-hello.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).