]> git.notmuchmail.org Git - notmuch/blobdiff - test/test-lib.sh
CLI: centralize initialization in notmuch_client_init
[notmuch] / test / test-lib.sh
index 1067316dbb3f2b9ad1fd8c65d52cf3d9c3ca916a..d46bb4c34a9165599542b2eff981e5d224f63d67 100644 (file)
@@ -114,6 +114,12 @@ unset ALTERNATE_EDITOR
 unset EMAIL
 unset NAME
 
+test_require_emacs () {
+    test_require_external_prereq emacs
+    test_require_external_prereq ${TEST_EMACSCLIENT}
+    test_require_external_prereq dtach
+}
+
 add_gnupg_home ()
 {
     [ -e "${GNUPGHOME}/gpg.conf" ] && return
@@ -592,6 +598,9 @@ test_emacs_expect_t () {
                exec 1>&6 2>&7          # Restore stdout and stderr
                inside_subtest=
 
+               # test_emacs may update missing external prerequisites
+               test_check_missing_external_prereqs_ "$test_subtest_name" && return
+
                # Report success/failure.
                result=$(cat OUTPUT)
                if [ "$result" = t ]
@@ -1115,10 +1124,6 @@ test_python() {
        $NOTMUCH_PYTHON -B - > OUTPUT
 }
 
-test_ruby() {
-    MAIL_DIR=$MAIL_DIR $NOTMUCH_RUBY -I "$NOTMUCH_BUILDDIR/bindings/ruby"> OUTPUT
-}
-
 test_C () {
     local exec_file test_file
     exec_file="test${test_count}"