]> git.notmuchmail.org Git - notmuch/blobdiff - test/emacs-hello
test: expand regex in test/basic
[notmuch] / test / emacs-hello
index b235e3ab9913dba873d077ef2582ff7c09a00815..48d1420fd365a8a7f0e499ca59cb7d62dae83f2c 100755 (executable)
@@ -1,6 +1,6 @@
 #!/usr/bin/env bash
 
-test_description="Testing emacs notmuch-hello view"
+test_description="emacs notmuch-hello view"
 . test-lib.sh
 
 EXPECTED=$TEST_DIRECTORY/emacs.expected-output
@@ -44,4 +44,26 @@ test_emacs "(let ((notmuch-hello-sections
              (test-output))"
 test_expect_equal_file OUTPUT $EXPECTED/notmuch-hello-section-counts
 
+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 OUTPUT $EXPECTED/notmuch-hello-empty-custom-tags-section
+
+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 OUTPUT $EXPECTED/notmuch-hello-empty-custom-queries-section
+
+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 OUTPUT $EXPECTED/notmuch-hello-long-names
+
 test_done