aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--test/README8
-rw-r--r--test/test-lib.sh6
2 files changed, 14 insertions, 0 deletions
diff --git a/test/README b/test/README
index 86afab5c..1a5b5167 100644
--- a/test/README
+++ b/test/README
@@ -154,6 +154,14 @@ library for your script to use.
argument. This is primarily meant for use during the
development of a new test script.
+ test_emacs <emacs-lisp-expressions>
+
+ This function executes the provided emacs lisp script within
+ emacs. The script can be a sequence of emacs lisp expressions,
+ (that is, they will be evaluated within a progn form). The lisp
+ expressions can call `message' to generate output on stdout to be
+ examined by the calling test script.
+
test_done
Your test script must have test_done at the end. Its purpose
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"