v1-0001-Added-a-test-for-checking-the-length-of-help-outp.patch
text/x-diff
Filename: v1-0001-Added-a-test-for-checking-the-length-of-help-outp.patch
Type: text/x-diff
Part: 0
Patch
Format: format-patch
Series: patch v1-0001
Subject: Added a test for checking the length of --help output
| File | + | − |
|---|---|---|
| src/test/perl/PostgreSQL/Test/Utils.pm | 7 | 0 |
From 3dbfdb79680a0c1b68d4f742ae408810a1ee999d Mon Sep 17 00:00:00 2001
From: Atsushi Torikoshi <torikoshia@oss.nttdata.com>
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