]> git.notmuchmail.org Git - notmuch/blobdiff - test/test-lib.sh
lib: Bump library version from 3.0.0 to 3.1.0
[notmuch] / test / test-lib.sh
index d3a8c58e97b92eb5382341860fb0e493aa8209b2..8611ba5ecefc6eddf62ae7da95d3fab39a421df8 100644 (file)
@@ -445,6 +445,7 @@ emacs_deliver_message ()
 
     test_emacs \
        "(let ((message-send-mail-function 'message-smtpmail-send-it)
+               (mail-host-address \"example.com\")
               (smtpmail-smtp-server \"localhost\")
               (smtpmail-smtp-service \"25025\"))
           (notmuch-hello)
@@ -627,6 +628,17 @@ notmuch_json_show_sanitize ()
        -e 's|"filename": "/[^"]*",|"filename": "YYYYY",|g'
 }
 
+notmuch_emacs_error_sanitize ()
+{
+    local command=$1
+    shift
+    for file in "$@"; do
+       echo "=== $file ==="
+       cat "$file"
+    done | sed  \
+       -e 's/^\[.*\]$/[XXX]/' \
+       -e "s|^\(command: \)\{0,1\}/.*/$command|\1YYY/$command|"
+}
 # End of notmuch helper functions
 
 # Use test_set_prereq to tell that a particular prerequisite is available.