]> git.notmuchmail.org Git - notmuch/blobdiff - test/test-lib.sh
emacs: Enable FCC (to a directory named "sent") by default.
[notmuch] / test / test-lib.sh
index 6c9c93eb8a63c425f5f6da28df4048a63fdfb784..28d14ef96aaa6965c5bbc8eedd963ad2928d5401 100644 (file)
@@ -735,7 +735,11 @@ test_done () {
 
 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})"
+    emacs --batch --no-site-file --directory ../../emacs --load notmuch.el \
+       --eval "(defun notmuch-test-wait ()
+                       (while (get-buffer-process (current-buffer))
+                               (sleep-for 0.1)))" \
+       --eval "(progn (set-frame-width (window-frame (get-buffer-window)) 80) ${emacs_code})"
 }
 
 
@@ -840,7 +844,8 @@ rm -fr "$test" || {
 }
 
 MAIL_DIR="${TMP_DIRECTORY}/mail"
-export NOTMUCH_CONFIG="${TMP_DIRECTORY}/notmuch-config"
+export HOME="${TMP_DIRECTORY}"
+export NOTMUCH_CONFIG="${HOME}/notmuch-config"
 
 mkdir -p "${test}"
 mkdir -p "${MAIL_DIR}"