mirror of
https://github.com/postgres/postgres.git
synced 2026-05-19 16:57:03 -04:00
Previously, running pg_waldump with an invalid option (pg_waldump --foo) would print the help output and exit successfully. This was because it tried to process the option letter '?' as a normal option, but that letter is used by getopt() to report an invalid option. To fix, process help and version options separately, like we do everywhere else. Also add a basic test suite for pg_waldump and run the basic option handling tests, which would have caught this.
8 lines
175 B
Perl
8 lines
175 B
Perl
use strict;
|
|
use warnings;
|
|
use TestLib;
|
|
use Test::More tests => 8;
|
|
|
|
program_help_ok('pg_waldump');
|
|
program_version_ok('pg_waldump');
|
|
program_options_handling_ok('pg_waldump');
|