]> git.notmuchmail.org Git - notmuch/blobdiff - test/test-lib.sh
test: Add test for searching of uncommonly encoded messages
[notmuch] / test / test-lib.sh
index 815832843cd3a3a400bca439965e9a68856975a2..278150677c4a92e8df4a723be693fae108213576 100644 (file)
@@ -356,6 +356,11 @@ ${additional_headers}"
 ${additional_headers}"
     fi
 
+    if [ ! -z "${template[content-transfer-encoding]}" ]; then
+       additional_headers="Content-Transfer-Encoding: ${template[content-transfer-encoding]}
+${additional_headers}"
+    fi
+
     # Note that in the way we're setting it above and using it below,
     # `additional_headers' will also serve as the header / body separator
     # (empty line in between).
@@ -702,8 +707,8 @@ test_skip () {
 
 test_check_missing_external_prereqs_ () {
        if test -n "$test_subtest_missing_external_prereqs_"; then
-               say_color skip >&3 "missing prerequisites:"
-               echo "$test_subtest_missing_external_prereqs_" >&3
+               say_color skip >&1 "missing prerequisites:"
+               echo "$test_subtest_missing_external_prereqs_" >&1
                test_report_skip_ "$@"
        else
                false
@@ -943,6 +948,12 @@ test_emacs () {
        test -z "$missing_dependencies" || return
 
        if [ -z "$EMACS_SERVER" ]; then
+               emacs_tests="$(basename $0).el"
+               if [ -f "$TEST_DIRECTORY/$emacs_tests" ]; then
+                       load_emacs_tests="--eval '(load \"$emacs_tests\")'"
+               else
+                       load_emacs_tests=
+               fi
                server_name="notmuch-test-suite-$$"
                # start a detached session with an emacs server
                # user's TERM is given to dtach which assumes a minimally
@@ -950,6 +961,7 @@ test_emacs () {
                TERM=$ORIGINAL_TERM dtach -n "$TEST_TMPDIR/emacs-dtach-socket.$$" \
                        sh -c "stty rows 24 cols 80; exec '$TMP_DIRECTORY/run_emacs' \
                                --no-window-system \
+                               $load_emacs_tests \
                                --eval '(setq server-name \"$server_name\")' \
                                --eval '(server-start)' \
                                --eval '(orphan-watchdog $$)'" || return