1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2025-03-05 15:05:48 +02:00

Add LFs to storage list tests.

This makes the diffs easier to read when testing.
This commit is contained in:
David Steele 2019-09-23 15:10:31 -04:00
parent c969137021
commit 072aeb8109
2 changed files with 5 additions and 9 deletions

View File

@ -14,10 +14,6 @@ hrnStorageInfoListCallback(void *callbackData, const StorageInfo *info)
{
HarnessStorageInfoListCallbackData *data = callbackData;
// Add LF for after the first item
if (strSize(data->content) != 0)
strCat(data->content, "\n");
strCatFmt(data->content, "%s {", strPtr(info->name));
switch (info->type)
@ -93,5 +89,5 @@ hrnStorageInfoListCallback(void *callbackData, const StorageInfo *info)
}
}
strCat(data->content, "}");
strCat(data->content, "}\n");
}

View File

@ -287,7 +287,7 @@ testRun(void)
storageInfoListP(storageTest, strNew("pg"), hrnStorageInfoListCallback, &callbackData),
"directory with one dot file sorted");
TEST_RESULT_STR_Z(
callbackData.content, strPtr(strNewFmt(". {path, m=0766, u=%s, g=%s}", testUser(), testGroup())),
callbackData.content, strPtr(strNewFmt(". {path, m=0766, u=%s, g=%s}\n", testUser(), testGroup())),
" check content");
// -------------------------------------------------------------------------------------------------------------------------
@ -319,7 +319,7 @@ testRun(void)
".include {path, m=0755, u=77777, g=77777}\n"
"file {file, s=8, m=0660}\n"
"link {link, d=../file}\n"
"pipe {special}",
"pipe {special}\n",
" check content");
// -------------------------------------------------------------------------------------------------------------------------
@ -340,7 +340,7 @@ testRun(void)
"path {path, m=0700}\n"
"link {link, d=../file}\n"
"file {file, s=8, m=0660}\n"
". {path}",
". {path}\n",
" check content");
// -------------------------------------------------------------------------------------------------------------------------
@ -353,7 +353,7 @@ testRun(void)
"filter");
TEST_RESULT_STR_Z(
callbackData.content,
"path {path, m=0700}",
"path {path, m=0700}\n",
" check content");
}