On Sun, Jul 22, 2018 at 10:19:50AM -0400, Fabien COELHO wrote: >> Agreed. I have changed handling of the --help and --version options in all >> apps >> where it exhibits the problem described, with the exception for >> pg_archivecleanup >> where getopt is used instead of getopt_long. The separate patch will be >> proposed >> to address it. >> >> The patch is against current master. All tests pass. > > I doubt that -V & -? are heavily tested:-) Patch works for me, though.
They are not, and the patch misses this area. I don't think that it is a bad idea to improve things the way you are doing, however you should extend program_version_ok() and program_help_ok() in src/test/perl/TestLib.pm so as short options are tested for two reasons: 1) We can make sure that everything is consistent and works properly easily without testing manually your patch, which is a pain for anybody looking at the patch. 2) Any new standalone binary added in the core tree would be able to check natively if it handles common options correctly with TAP tests added. This will need tweaks for the number of tests in a couple of TAP files, but that's worth the shot in the long term. -- Michael
signature.asc
Description: PGP signature