aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Worth <cworth@cworth.org>2010-10-29 15:53:34 -0700
committerCarl Worth <cworth@cworth.org>2010-10-29 15:53:34 -0700
commit3fe90a955e21bc6825e3d9b7ffaba31e1c3d0c8b (patch)
tree4ec35ddceca94a9f9495bdf161230ca0a48cac18
parentdec2d57fbcaf470e97c37cd40d2953b2404f07b6 (diff)
test: Test emacs notmuch-hello with no saved searches to display.
Haippily, this works just fine, but we might as well test that.
-rwxr-xr-xtest/emacs5
-rw-r--r--test/emacs.expected-output/notmuch-hello-no-saved-searches10
2 files changed, 15 insertions, 0 deletions
diff --git a/test/emacs b/test/emacs
index f9da318..97f4628 100755
--- a/test/emacs
+++ b/test/emacs
@@ -16,6 +16,11 @@ output=$(test_emacs '(setq notmuch-show-empty-saved-searches t) (setq notmuch-sa
expected=$(cat $EXPECTED/notmuch-hello-with-empty)
test_expect_equal "$output" "$expected"
+test_begin_subtest "No saved searches displayed (all with 0 results)"
+output=$(test_emacs '(setq notmuch-saved-searches '\''(("empty" . "tag:doesnotexist"))) (notmuch-hello) (message (buffer-string))' 2>&1)
+expected=$(cat $EXPECTED/notmuch-hello-no-saved-searches)
+test_expect_equal "$output" "$expected"
+
test_begin_subtest "Basic notmuch-search view in emacs"
output=$(test_emacs '(notmuch-search "tag:inbox") (notmuch-test-wait) (message (buffer-string))' 2>&1)
expected=$(cat $EXPECTED/notmuch-search-tag-inbox)
diff --git a/test/emacs.expected-output/notmuch-hello-no-saved-searches b/test/emacs.expected-output/notmuch-hello-no-saved-searches
new file mode 100644
index 0000000..7f8206a
--- /dev/null
+++ b/test/emacs.expected-output/notmuch-hello-no-saved-searches
@@ -0,0 +1,10 @@
+ Welcome to notmuch. You have 50 messages.
+
+Search:
+
+[Show all tags]
+
+ Type a search query and hit RET to view matching threads.
+ Edit saved searches with the `edit' button.
+ Hit RET or click on a saved search or tag name to view matching threads.
+ `=' refreshes this screen. `s' jumps to the search box. `q' to quit.