Re: test_escape: invalid option -- 'c'

Michael Paquier <michael@paquier.xyz>

From: Michael Paquier <michael@paquier.xyz>
To: Japin Li <japinli@hotmail.com>
Cc: Pg Hackers <pgsql-hackers@postgresql.org>
Date: 2025-02-18T03:46:50Z
Lists: pgsql-hackers
On Tue, Feb 18, 2025 at 11:12:13AM +0800, Japin Li wrote:
> When I test test_escape, I find the usage of test_escape declares it
> support -c option, however, when I use it, it complains it is an
> invalid option.
> 
> Here is a patch to fix it.

You are right, obviously.  The only reason why this is not showing up
is that the TAP test uses the long option --conninfo.  Speaking of
which, this had better use fat commas to combine the option/value
pairs in these commands.
--
Michael

Commits

  1. test_escape: Fix output of --help

  2. test_escape: Fix handling of short options in getopt_long()