mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-11-25 20:38:08 +01:00
test: pass expected output through json_sanitize in 2 places
This makes the tests more robust against changes in the sanitization rules.
This commit is contained in:
parent
bb390f89a1
commit
20f78709fa
2 changed files with 6 additions and 4 deletions
|
@ -95,7 +95,7 @@ Body
|
||||||
|
|
||||||
test_begin_subtest "Show: json"
|
test_begin_subtest "Show: json"
|
||||||
output=$(notmuch show --format=json '*' | notmuch_json_show_sanitize)
|
output=$(notmuch show --format=json '*' | notmuch_json_show_sanitize)
|
||||||
test_expect_equal_json "$output" '
|
expected=$(notmuch_json_show_sanitize <<EOF
|
||||||
[
|
[
|
||||||
[
|
[
|
||||||
[
|
[
|
||||||
|
@ -156,7 +156,9 @@ test_expect_equal_json "$output" '
|
||||||
[]
|
[]
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
]'
|
]
|
||||||
|
EOF
|
||||||
|
)
|
||||||
|
test_expect_equal_json "$output" "$expected"
|
||||||
|
|
||||||
test_done
|
test_done
|
||||||
|
|
|
@ -594,7 +594,7 @@ test_expect_equal_file OUTPUT EXPECTED
|
||||||
|
|
||||||
test_begin_subtest "'notmuch reply' to a multipart message with json format"
|
test_begin_subtest "'notmuch reply' to a multipart message with json format"
|
||||||
notmuch reply --format=json 'id:87liy5ap00.fsf@yoom.home.cworth.org' | notmuch_json_show_sanitize >OUTPUT
|
notmuch reply --format=json 'id:87liy5ap00.fsf@yoom.home.cworth.org' | notmuch_json_show_sanitize >OUTPUT
|
||||||
cat <<EOF >EXPECTED
|
notmuch_json_show_sanitize <<EOF >EXPECTED
|
||||||
{"reply-headers": {"Subject": "Re: Multipart message",
|
{"reply-headers": {"Subject": "Re: Multipart message",
|
||||||
"From": "Notmuch Test Suite <test_suite@notmuchmail.org>",
|
"From": "Notmuch Test Suite <test_suite@notmuchmail.org>",
|
||||||
"To": "Carl Worth <cworth@cworth.org>, cworth@cworth.org",
|
"To": "Carl Worth <cworth@cworth.org>, cworth@cworth.org",
|
||||||
|
|
Loading…
Reference in a new issue