diff options
| author | David Bremner <david@tethera.net> | 2022-07-01 18:45:41 -0300 |
|---|---|---|
| committer | David Bremner <david@tethera.net> | 2022-07-05 07:03:37 -0300 |
| commit | 0a3bb81d4f4cf7b4a3dd607e7a5c7a62695cb4f1 (patch) | |
| tree | 60a2d23847a057fc915dc9c6a8498e73a5f92c75 /test/test-lib.sh | |
| parent | 5f6645bd2a07542902fe9b39b986fdde69a0ebcf (diff) | |
test: define and use notmuch_sexp_*_sanitize functions
These are based on the equivalent functions for json. Like those,
these are pretty simple-minded, and don't really understand the
syntax.
Diffstat (limited to 'test/test-lib.sh')
| -rw-r--r-- | test/test-lib.sh | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/test-lib.sh b/test/test-lib.sh index 75a62214..4eb58ea0 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 |
