diff options
| author | David Bremner <david@tethera.net> | 2022-07-01 18:45:40 -0300 |
|---|---|---|
| committer | David Bremner <david@tethera.net> | 2022-07-05 07:01:39 -0300 |
| commit | 5f6645bd2a07542902fe9b39b986fdde69a0ebcf (patch) | |
| tree | a44350cf891a80924219048c31d3fefa4e1aa12c /test/T220-reply.sh | |
| parent | 3cb936b7c458bc9b0f5cc6d7fb266307fd0224d8 (diff) | |
test: use notmuch_json_show_sanitize more places
This makes the tests more robust against changing output formats, by
allowing us to centralize fixes in the sanitization function. It is
not appropriate for all cases, in particular it is unneeded when using
test_json_nodes, and unhelpful when testing filenames.
Diffstat (limited to 'test/T220-reply.sh')
| -rwxr-xr-x | test/T220-reply.sh | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/test/T220-reply.sh b/test/T220-reply.sh index 4e9984d2..50179efc 100755 --- a/test/T220-reply.sh +++ b/test/T220-reply.sh @@ -298,7 +298,8 @@ On Tue, 05 Jan 2010 15:43:56 -0000, ☃ <snowman@example.com> wrote: OK" test_begin_subtest "Reply with RFC 2047-encoded headers (JSON)" -output=$(echo '{"answer":' && notmuch reply --format=json id:${gen_msg_id} 2>&1 && echo ', "success": "OK"}') +output=$(echo '{"answer":' && notmuch reply --format=json id:${gen_msg_id} 2>&1 | notmuch_json_show_sanitize \ + && echo ', "success": "OK"}') test_expect_equal_json "$output" ' { "answer": { "original": { @@ -312,14 +313,14 @@ test_expect_equal_json "$output" ' "crypto": {}, "date_relative": "2010-01-05", "excluded": false, - "filename": ["'${MAIL_DIR}'/msg-015"], + "filename": ["YYYYY"], "headers": { "Date": "Tue, 05 Jan 2010 15:43:56 +0000", "From": "\u2603 <snowman@example.com>", "Subject": "\u00e0\u00df\u00e7", "To": "Notmuch Test Suite <test_suite@notmuchmail.org>" }, - "id": "'${gen_msg_id}'", + "id": "XXXXX", "match": false, "tags": [ "inbox", |
