]> git.notmuchmail.org Git - notmuch/blobdiff - test/test-lib.sh
test: replace $PWD with YYY in emacs & emacs-show tests
[notmuch] / test / test-lib.sh
index 2aa4dfc958acf0cf1275fc339f0cc5eb7133b69e..8611ba5ecefc6eddf62ae7da95d3fab39a421df8 100644 (file)
@@ -628,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.