aboutsummaryrefslogtreecommitdiff
path: root/test/test-lib.sh
diff options
context:
space:
mode:
authorDavid Bremner <david@tethera.net>2022-07-01 18:45:44 -0300
committerDavid Bremner <david@tethera.net>2022-07-30 08:41:50 -0300
commit4612f3eb3dbf16bf98ccbadef77d7a6f6361e692 (patch)
tree11f6350c5731fe3777d66cbb87e198377c0c342e /test/test-lib.sh
parentcef5eaaef61b1f4dde6276ef267fb923f1b16680 (diff)
CLI/show: support --duplicate for structured output
This introduces a new mandatory key for message structures, namely "duplicate". Per convention in devel/schemata this does _not_ increase the format version. This means that clients are responsible for checking that it exists, and not crashing if it does not. The main functional change is teaching mime_node_open to understand a 'duplicate' argument. Support for --duplicate in notmuch-reply would make sense, but we defer it to a later commit.
Diffstat (limited to 'test/test-lib.sh')
-rw-r--r--test/test-lib.sh2
1 files changed, 2 insertions, 0 deletions
diff --git a/test/test-lib.sh b/test/test-lib.sh
index e9f32582..d664812f 100644
--- a/test/test-lib.sh
+++ b/test/test-lib.sh
@@ -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'