test: Add the most rudimentary testing of the emacs interface.
authorCarl Worth <cworth@cworth.org>
Fri, 22 Oct 2010 19:10:15 +0000 (12:10 -0700)
committerCarl Worth <cworth@cworth.org>
Fri, 22 Oct 2010 19:10:15 +0000 (12:10 -0700)
So far, this is doing nothing more than adding a corpus of email and
ensuring that the `notmuch-hello' function produces the desired
output.

test/emacs [new file with mode: 0755]
test/notmuch-test

diff --git a/test/emacs b/test/emacs
new file mode 100755 (executable)
index 0000000..f9db5d1
--- /dev/null
@@ -0,0 +1,25 @@
+#!/bin/bash
+test_description="emacs interface"
+. test-lib.sh
+
+add_email_corpus
+
+test_begin_subtest "Test emacs-hello interface"
+output=$(test_emacs '(notmuch-hello) (message (buffer-string))' 2>&1)
+test_expect_equal "$output" "   Welcome to notmuch. You have 50 messages (that's not much mail).
+
+Saved searches: [edit]
+
+         50 inbox           50 unread    
+
+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."
+
+
+test_done
index 13c5d80686bf6c2fb28ca9f4d65e9cf1a8fcfefa..7feb5bdf5fd14d1ef26ec10a912ee1add51760d7 100755 (executable)
@@ -8,7 +8,7 @@
 
 cd $(dirname "$0")
 
-TESTS="basic new search json thread-naming reply dump-restore uuencode thread-order author-order from-guessing long-id encoding"
+TESTS="basic new search json thread-naming reply dump-restore uuencode thread-order author-order from-guessing long-id encoding emacs"
 
 # Clean up any results from a previous run
 rm -r test-results >/dev/null 2>/dev/null