]> git.notmuchmail.org Git - notmuch/blobdiff - test/test-lib.sh
test: sanitize dates in emacs, raw, and text output
[notmuch] / test / test-lib.sh
index 8f18e735e5aee10262f5b5487d99e05f25ad260e..d22408d8135bfd954c984830b104bdc1160e4de6 100644 (file)
@@ -618,7 +618,8 @@ notmuch_show_sanitize_all ()
 {
     sed \
        -e 's| filename:.*| filename:XXXXX|' \
-       -e 's| id:[^ ]* | id:XXXXX |'
+       -e 's| id:[^ ]* | id:XXXXX |' | \
+       notmuch_date_sanitize
 }
 
 notmuch_json_show_sanitize ()
@@ -641,6 +642,12 @@ notmuch_emacs_error_sanitize ()
        -e 's/^\[.*\]$/[XXX]/' \
        -e "s|^\(command: \)\{0,1\}/.*/$command|\1YYY/$command|"
 }
+
+notmuch_date_sanitize ()
+{
+    sed \
+       -e 's/^Date: Fri, 05 Jan 2001 .*0000/Date: GENERATED_DATE/'
+}
 # End of notmuch helper functions
 
 # Use test_set_prereq to tell that a particular prerequisite is available.