3 test_description="Testing emacs notmuch-hello view"
6 EXPECTED=$TEST_DIRECTORY/emacs.expected-output
10 test_begin_subtest "User-defined section with inbox tag"
11 test_emacs "(let ((notmuch-hello-sections
12 (list (lambda () (notmuch-hello-insert-searches
13 \"Test\" '((\"inbox\" . \"tag:inbox\")))))))
16 test_expect_equal_file OUTPUT $EXPECTED/notmuch-hello-new-section
18 test_begin_subtest "User-defined section with empty, hidden entry"
19 test_emacs "(let ((notmuch-hello-sections
20 (list (lambda () (notmuch-hello-insert-searches
22 '((\"inbox\" . \"tag:inbox\")
23 (\"doesnotexist\" . \"tag:doesnotexist\"))
24 :hide-empty-searches t)))))
27 test_expect_equal_file OUTPUT $EXPECTED/notmuch-hello-section-with-empty
29 test_begin_subtest "User-defined section, unread tag filtered out"
30 test_emacs "(let ((notmuch-hello-sections
31 (list (lambda () (notmuch-hello-insert-tags-section
32 \"Test-with-filtered\"
33 :hide-tags '(\"unread\"))))))
36 test_expect_equal_file OUTPUT $EXPECTED/notmuch-hello-section-hidden-tag
38 test_begin_subtest "User-defined section, different query for counts"
39 test_emacs "(let ((notmuch-hello-sections
40 (list (lambda () (notmuch-hello-insert-tags-section
42 :filter-count \"tag:signed\")))))
45 test_expect_equal_file OUTPUT $EXPECTED/notmuch-hello-section-counts
47 test_begin_subtest "Column alignment for tag/queries with long names"
48 tag=a-very-long-tag # length carefully calculated for 80 characters window width
50 test_emacs '(notmuch-hello)
53 test_expect_equal_file OUTPUT $EXPECTED/notmuch-hello-long-names