]> git.cworth.org Git - notmuch/blobdiff - test/test-lib.sh
emacs/show: display count of duplicates in headerline
[notmuch] / test / test-lib.sh
index 4eb58ea0a29a4e8c08ec6869b479d5e07588967a..d664812f610f91c3d38b1b96aa905ae756896c73 100644 (file)
@@ -522,6 +522,7 @@ notmuch_json_show_sanitize () {
        -e 's|"id": "[^"]*",|"id": "XXXXX",|g' \
        -e 's|"Date": "Fri, 05 Jan 2001 [^"]*0000"|"Date": "GENERATED_DATE"|g' \
        -e 's|"filename": "signature.asc",||g' \
+       -e 's|"duplicate": 1,||g' \
        -e 's|"filename": \["/[^"]*"\],|"filename": \["YYYYY"\],|g' \
        -e 's|"timestamp": 97.......|"timestamp": 42|g' \
        -e 's|"content-length": [1-9][0-9]*|"content-length": "NONZERO"|g'
@@ -532,6 +533,7 @@ notmuch_sexp_show_sanitize () {
        -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|:duplicate 1 ||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'
@@ -559,6 +561,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'
 }