diff options
author | Peter Eisentraut | 2019-06-05 20:55:16 +0000 |
---|---|---|
committer | Peter Eisentraut | 2019-06-06 08:14:25 +0000 |
commit | f65eced25118aab29804debc4e0b9a67f4d043ad (patch) | |
tree | 38e42811d3f36c7e5a441ab76e5a5fb8b56b776f /src/bin/pg_waldump/t | |
parent | cd96389d713787b025c84869ba417c6f2f008a86 (diff) |
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.
Diffstat (limited to 'src/bin/pg_waldump/t')
-rw-r--r-- | src/bin/pg_waldump/t/001_basic.pl | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/bin/pg_waldump/t/001_basic.pl b/src/bin/pg_waldump/t/001_basic.pl new file mode 100644 index 0000000000..5af0ce94fb --- /dev/null +++ b/src/bin/pg_waldump/t/001_basic.pl @@ -0,0 +1,8 @@ +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'); |