From b0ae0826374ce86c95ee36637913b65f865d6e0b Mon Sep 17 00:00:00 2001 From: Atsushi Torikoshi Date: Mon, 25 Sep 2023 10:40:36 +0900 Subject: [PATCH v1 1/2] Added a test for checking the line length of --help output. --- src/test/perl/PostgreSQL/Test/Utils.pm | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/test/perl/PostgreSQL/Test/Utils.pm b/src/test/perl/PostgreSQL/Test/Utils.pm index d66fe1cf45..291b5dcbbb 100644 --- a/src/test/perl/PostgreSQL/Test/Utils.pm +++ b/src/test/perl/PostgreSQL/Test/Utils.pm @@ -884,6 +884,14 @@ sub program_help_ok ok($result, "$cmd --help exit code 0"); isnt($stdout, '', "$cmd --help goes to stdout"); is($stderr, '', "$cmd --help nothing to stderr"); + + # We set the hard limit on the length of line to 120 + subtest "$cmd --help outputs fit within 120 columns per line" => sub { + foreach my $line (split /\n/, $stdout) + { + ok(length($line) <= 120, "$line"); + } +}; return; } -- 2.39.2