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:
parent
c969137021
commit
072aeb8109
@ -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");
|
||||
}
|
||||
|
@ -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");
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user