1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2025-07-05 00:28:52 +02:00

Add beta feature infrastructure.

This allows options to be marked as beta, which will require that the --beta option be supplied to prevent accidental usage of a beta feature.

The online and command-line documentation also show warnings when options are beta.
This commit is contained in:
David Steele
2023-03-10 15:30:27 +07:00
parent 6b409d049e
commit 24f725212d
20 changed files with 257 additions and 31 deletions

View File

@ -98,17 +98,24 @@ testRun(void)
if (testBegin("helpRenderText()"))
{
TEST_RESULT_STR_Z(
helpRenderText(STRDEF("this is a short sentence"), false, 0, false, 80), "this is a short sentence", "one line");
helpRenderText(STRDEF("this is a short sentence"), false, false, 0, false, 80), "this is a short sentence", "one line");
TEST_RESULT_STR_Z(
helpRenderText(STRDEF("this is a short sentence"), false, 4, false, 14),
helpRenderText(STRDEF("this is a short sentence"), false, false, 4, false, 14),
"this is a\n"
" short\n"
" sentence",
"three lines, no indent first");
TEST_RESULT_STR_Z(
helpRenderText(STRDEF("This is a short paragraph.\n\nHere is another one."), true, 2, true, 16),
helpRenderText(STRDEF("this is a short sentence"), true, true, 4, true, 132),
" this is a short sentence\n"
"\n"
" FOR BETA TESTING ONLY. DO NOT USE IN PRODUCTION.",
"beta feature");
TEST_RESULT_STR_Z(
helpRenderText(STRDEF("This is a short paragraph.\n\nHere is another one."), true, false, 2, true, 16),
" This is a\n"
" short\n"
" paragraph.\n"