]> git.ipfire.org Git - thirdparty/postgresql.git/commitdiff
pgbench: Use standard option handling test routines
authorPeter Eisentraut <peter@eisentraut.org>
Mon, 30 Jun 2025 08:45:08 +0000 (10:45 +0200)
committerPeter Eisentraut <peter@eisentraut.org>
Mon, 30 Jun 2025 08:47:42 +0000 (10:47 +0200)
Run program_XXX tests instead of its own tests.  This ensures
consistency with the test suites of other programs and enforces common
policies, such as help line length.

Author: Hayato Kuroda <kuroda.hayato@fujitsu.com>
Reviewed-by: Fujii Masao <masao.fujii@oss.nttdata.com>
Discussion: https://www.postgresql.org/message-id/flat/OSCPR01MB14966247015B7E3D8D340D022F56FA@OSCPR01MB14966.jpnprd01.prod.outlook.com

src/bin/pgbench/t/002_pgbench_no_server.pl

index f975c73dd758a257dba462b9499581613d4d9de3..2cc59cc8140c3907574ed2db1dff2e5241e945de 100644 (file)
@@ -233,21 +233,9 @@ for my $o (@options)
                'pgbench option error: ' . $name);
 }
 
-# Help
-pgbench(
-       '--help', 0,
-       [
-               qr{benchmarking tool for PostgreSQL},
-               qr{Usage},
-               qr{Initialization options:},
-               qr{Common options:},
-               qr{Report bugs to}
-       ],
-       [qr{^$}],
-       'pgbench help');
-
-# Version
-pgbench('-V', 0, [qr{^pgbench .PostgreSQL. }], [qr{^$}], 'pgbench version');
+program_help_ok('pgbench');
+program_version_ok('pgbench');
+program_options_handling_ok('pgbench');
 
 # list of builtins
 pgbench(