mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-11-25 12:28:09 +01:00
test: normalize only message filenames in show json
notmuch_json_show_sanitize replaced "filename" field values even in part structures, where the value is predictable. Make it only normalize the filename value if it is an absolute path (begins with slash), which is true of the Maildir filenames that were intended to be normalized away.
This commit is contained in:
parent
2cdb3f54f7
commit
ee425ae2ad
2 changed files with 2 additions and 2 deletions
|
@ -630,7 +630,7 @@ cat <<EOF >EXPECTED
|
||||||
"content": "This is an embedded message, with a multipart/alternative part.\n"}]}]}]},
|
"content": "This is an embedded message, with a multipart/alternative part.\n"}]}]}]},
|
||||||
{"id": 7,
|
{"id": 7,
|
||||||
"content-type": "text/plain",
|
"content-type": "text/plain",
|
||||||
"filename": "YYYYY",
|
"filename": "attachment",
|
||||||
"content": "This is a text attachment.\n"},
|
"content": "This is a text attachment.\n"},
|
||||||
{"id": 8,
|
{"id": 8,
|
||||||
"content-type": "text/plain",
|
"content-type": "text/plain",
|
||||||
|
|
|
@ -600,7 +600,7 @@ notmuch_json_show_sanitize ()
|
||||||
{
|
{
|
||||||
sed \
|
sed \
|
||||||
-e 's|"id": "[^"]*",|"id": "XXXXX",|g' \
|
-e 's|"id": "[^"]*",|"id": "XXXXX",|g' \
|
||||||
-e 's|"filename": "[^"]*",|"filename": "YYYYY",|g'
|
-e 's|"filename": "/[^"]*",|"filename": "YYYYY",|g'
|
||||||
}
|
}
|
||||||
|
|
||||||
# End of notmuch helper functions
|
# End of notmuch helper functions
|
||||||
|
|
Loading…
Reference in a new issue