aboutsummaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
authorGravatar Dmitry Kurochkin <dmitry.kurochkin@gmail.com>2012-05-05 18:39:46 +0400
committerGravatar David Bremner <bremner@debian.org>2012-05-06 19:44:42 -0300
commit512df7ec47a378f9807dd2c19db084fe6e4010ad (patch)
treef3ac12b223d59e40aa92b9b3908cee2f04f53dcc /test
parent97efed0f0854c2231625057738c1c2db7b37c139 (diff)
test: add Emacs notmuch-hello tests for custom tags and queries section.
The tests use default values from customization widgets to make sure that these customization widgets work (at least on basic level). The custom queries section test is currently broken.
Diffstat (limited to 'test')
-rwxr-xr-xtest/emacs-hello15
-rw-r--r--test/emacs.expected-output/notmuch-hello-empty-custom-queries-section3
-rw-r--r--test/emacs.expected-output/notmuch-hello-empty-custom-tags-section5
3 files changed, 23 insertions, 0 deletions
diff --git a/test/emacs-hello b/test/emacs-hello
index be66ba4c..936d00e6 100755
--- a/test/emacs-hello
+++ b/test/emacs-hello
@@ -44,6 +44,21 @@ 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_subtest_known_broken
+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 '*'
diff --git a/test/emacs.expected-output/notmuch-hello-empty-custom-queries-section b/test/emacs.expected-output/notmuch-hello-empty-custom-queries-section
new file mode 100644
index 00000000..cd0fdf08
--- /dev/null
+++ b/test/emacs.expected-output/notmuch-hello-empty-custom-queries-section
@@ -0,0 +1,3 @@
+: [hide]
+
+
diff --git a/test/emacs.expected-output/notmuch-hello-empty-custom-tags-section b/test/emacs.expected-output/notmuch-hello-empty-custom-tags-section
new file mode 100644
index 00000000..b56fd671
--- /dev/null
+++ b/test/emacs.expected-output/notmuch-hello-empty-custom-tags-section
@@ -0,0 +1,5 @@
+: [hide]
+
+ 4 attachment 7 signed
+ 52 inbox 52 unread
+