]> git.notmuchmail.org Git - notmuch/blobdiff - test/test-lib.sh
test: Clear test-output output file before running Emacs tests
[notmuch] / test / test-lib.sh
index f34b1fb86af15eb89b91c328e2558d0f0eb8207b..7448b454a023231947688a542d701438728b8497 100644 (file)
@@ -985,6 +985,14 @@ test_emacs () {
                done
        fi
 
+       # Clear test-output output file.  Most Emacs tests end with a
+       # call to (test-output).  If the test code fails with an
+       # exception before this call, the output file won't get
+       # updated.  Since we don't want to compare against an output
+       # file from another test, so start out with an empty file.
+       rm -f OUTPUT
+       touch OUTPUT
+
        emacsclient --socket-name="$EMACS_SERVER" --eval "(progn $@)"
 }