diff options
author | David Bremner <david@tethera.net> | 2013-12-08 22:52:41 +0800 |
---|---|---|
committer | David Bremner <david@tethera.net> | 2013-12-09 21:20:27 +0800 |
commit | 72ff135ac3e79be548bf5b82b63d15ba278ef4ce (patch) | |
tree | 1fae4b470a8f3e732212755e5f18e686ef13842e /test/test-lib.sh | |
parent | 18921be2e9c0b15c7a4c053718470f667fd35b35 (diff) |
test: sanitize dates in emacs, raw, and text output
add a new function notmuch_date_sanitize for rfc822-ish things. Add
date sanitization to notmuch_show_sanitize_all and use it more places.
This is all in aid of a transition to unique timestamps on messages.
Diffstat (limited to 'test/test-lib.sh')
-rw-r--r-- | test/test-lib.sh | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/test/test-lib.sh b/test/test-lib.sh index 8f18e735..d22408d8 100644 --- a/test/test-lib.sh +++ b/test/test-lib.sh @@ -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. |