X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=test%2Ftest-lib.sh;h=8611ba5ecefc6eddf62ae7da95d3fab39a421df8;hb=20f78709faae8fb36c6ebbf81ecfc856a5dcd3c7;hp=d3a8c58e97b92eb5382341860fb0e493aa8209b2;hpb=fae15296eca133c53e17e379e2efc839e4c1907e;p=notmuch diff --git a/test/test-lib.sh b/test/test-lib.sh index d3a8c58e..8611ba5e 100644 --- a/test/test-lib.sh +++ b/test/test-lib.sh @@ -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.