1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2025-07-07 00:35:37 +02:00

Add TEST_RESULT_STRLST_*() unit test macros.

This avoids the need for strLstJoin() when testing lists.

Lists are \n delimited (rather than command or pipe) so that non-trivial lists can be more easily diff'd.
This commit is contained in:
David Steele
2021-01-08 12:49:33 -05:00
parent 1ef36b4032
commit 97c260bb56
19 changed files with 325 additions and 322 deletions

View File

@ -227,11 +227,11 @@ testRun(void)
"P00 ERROR: [028]: invalid WAL '0000000200000001000000FF' for '9.2-1' exists, skipping\n"
"P00 ERROR: [028]: duplicate WAL '000000020000000200000001' for '9.2-1' exists, skipping");
TEST_RESULT_STR_Z(
strLstJoin(walFileList, ", "),
"0000000200000001000000FD-daa497dba64008db824607940609ba1cd7c6c501.gz, "
"0000000200000001000000FE-a6e1a64f0813352bc2e97f116a1800377e17d2e4.gz, "
"000000020000000200000000, 000000020000000200000002",
TEST_RESULT_STRLST_Z(
walFileList,
"0000000200000001000000FD-daa497dba64008db824607940609ba1cd7c6c501.gz\n"
"0000000200000001000000FE-a6e1a64f0813352bc2e97f116a1800377e17d2e4.gz\n"
"000000020000000200000000\n000000020000000200000002\n",
"skipped files removed");
//--------------------------------------------------------------------------------------------------------------------------