From 3dbfdb79680a0c1b68d4f742ae408810a1ee999d Mon Sep 17 00:00:00 2001 From: Atsushi Torikoshi Date: Fri, 15 Sep 2023 23:29:23 +0900 Subject: [PATCH v1] Added a test for checking the length of --help output --- src/test/perl/PostgreSQL/Test/Utils.pm | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/test/perl/PostgreSQL/Test/Utils.pm b/src/test/perl/PostgreSQL/Test/Utils.pm index 617caa022f..989f369ae7 100644 --- a/src/test/perl/PostgreSQL/Test/Utils.pm +++ b/src/test/perl/PostgreSQL/Test/Utils.pm @@ -843,6 +843,13 @@ 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"); + + subtest "$cmd --help outputs fit within 80 columns per line" => sub { + foreach my $line (split /\n/, $stdout) + { + ok(length($line) <= 80, "$line"); + } +}; return; } -- 2.39.2