aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/test-lib.sh
diff options
context:
space:
mode:
authorGravatar Carl Worth <cworth@cworth.org>2010-10-22 12:05:17 -0700
committerGravatar Carl Worth <cworth@cworth.org>2010-10-22 12:09:56 -0700
commit209e756cd4571964821221d5d4d8447b0aadd43d (patch)
treef0ef89b2891560f04ba73b5175a6ce3603b36bab /test/test-lib.sh
parentb97a763dc110f4bc74390e34acb29033c0c8bc90 (diff)
test: Add a new test_emacs function to test-lib.sh
This should be quite handy for doing automated testing of the emacs-based functionality in notmuch. This function invokes emacs with the necessary command-line arguments, (to run in batch mode with no local initialization, to load the notmuch code from the source directory, and to ensure an 80-column width).
Diffstat (limited to 'test/test-lib.sh')
-rw-r--r--test/test-lib.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/test-lib.sh b/test/test-lib.sh
index f1b07cc4..f67fbd1b 100644
--- a/test/test-lib.sh
+++ b/test/test-lib.sh
@@ -715,6 +715,12 @@ test_done () {
fi
}
+test_emacs () {
+ emacs_code="$1"
+ emacs --batch --no-site-file --directory ../../emacs --load notmuch.el --eval "(progn (set-frame-width (window-frame (get-buffer-window)) 80) ${emacs_code})"
+}
+
+
find_notmuch_path ()
{
dir="$1"