X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=test%2Ftest-lib.sh;h=e9f32582e38e99c32c0eb04b59d5725b7ed5d034;hb=6219e7380ae34cc0c8142f4174bee3cde9bf9662;hp=75a62214db5eb176fc7f96ca11b3ca80a1c2aa7d;hpb=2707c06a0fc587a68096a3ec6f054ba4f0d7e7c7;p=notmuch diff --git a/test/test-lib.sh b/test/test-lib.sh index 75a62214..e9f32582 100644 --- a/test/test-lib.sh +++ b/test/test-lib.sh @@ -527,6 +527,20 @@ notmuch_json_show_sanitize () { -e 's|"content-length": [1-9][0-9]*|"content-length": "NONZERO"|g' } +notmuch_sexp_show_sanitize () { + sed \ + -e 's|:id "[^"]*"|:id "XXXXX"|g' \ + -e 's|:Date "Sat, 01 Jan 2000 [^"]*0000"|:Date "GENERATED_DATE"|g' \ + -e 's|:filename "signature.asc"||g' \ + -e 's|:filename ("/[^"]*")|:filename ("YYYYY")|g' \ + -e 's|:timestamp 9........|:timestamp 42|g' \ + -e 's|:content-length [1-9][0-9]*|:content-length "NONZERO"|g' +} + +notmuch_sexp_search_sanitize () { + sed -e 's|:thread "[^"]*"|:thread "XXX"|' +} + notmuch_emacs_error_sanitize () { local command command=$1 @@ -545,6 +559,10 @@ notmuch_date_sanitize () { -e 's/^Date: Fri, 05 Jan 2001 .*0000/Date: GENERATED_DATE/' } +# remove redundant parts of notmuch-git internal paths +notmuch_git_sanitize () { + sed -e 's,tags/\([0-9a-f]\{2\}/\)\{2\},,' -e '/FORMAT/d' +} notmuch_uuid_sanitize () { sed 's/[0-9a-f]\{8\}-[0-9a-f]\{4\}-[0-9a-f]\{4\}-[0-9a-f]\{4\}-[0-9a-f]\{12\}/UUID/g' }