]> git.notmuchmail.org Git - notmuch/commitdiff
test/emacs: add known broken test for hidden tags
authorDavid Bremner <david@tethera.net>
Wed, 5 Jan 2022 01:06:04 +0000 (21:06 -0400)
committerDavid Bremner <david@tethera.net>
Thu, 20 Jan 2022 19:31:29 +0000 (15:31 -0400)
Gregor Zattler observed that tags could be unintentionally hidden in
the "All tags" view, and Tomi Ollia worked out [2] that the issue was tags
that only occured on excluded messages. This test reproduces that bug.

[1]: id:87wox1vovj.fsf@len.workgroup
[2]: id:m28t9faaim.fsf@guru.guru-group.fi

test/T440-emacs-hello.sh
test/emacs.expected-output/notmuch-hello-all-tags [new file with mode: 0644]

index a1ed1c2b90ec7c821d6033a013ba44155a2296f1..dc80cc75880d59845a02e7c5b29c7b4965d7c0ce 100755 (executable)
@@ -68,6 +68,17 @@ test_emacs '(notmuch-hello)
 notmuch tag -$tag '*'
 test_expect_equal_file $EXPECTED/notmuch-hello-long-names OUTPUT
 
+test_begin_subtest "All tags show up"
+test_subtest_known_broken
+tag=exclude_me
+notmuch tag +$tag '*'
+notmuch config set search.exclude_tags $tag
+test_emacs '(notmuch-hello)
+            (test-output)'
+notmuch tag -$tag '*'
+test_expect_equal_file $EXPECTED/notmuch-hello-all-tags OUTPUT
+
+test_done
 test_begin_subtest "notmuch-hello with nonexistent CWD"
 test_emacs '
       (notmuch-hello)
diff --git a/test/emacs.expected-output/notmuch-hello-all-tags b/test/emacs.expected-output/notmuch-hello-all-tags
new file mode 100644 (file)
index 0000000..2802a70
--- /dev/null
@@ -0,0 +1,15 @@
+   Welcome to notmuch. You have 52 messages.
+
+Saved searches: [edit]
+
+         52 inbox           52 unread          52 all mail
+
+Search:                                                                     .
+
+All tags: [hide]
+
+          4 attachment            52 inbox                 52 unread
+         52 exclude_me             7 signed
+
+        Hit `?' for context-sensitive help in any Notmuch screen.
+                     Customize Notmuch or this page.