Re: Improved TAP tests by replacing sub-optimal uses of ok() with better Test::More functions - Mailing list pgsql-hackers

From Andrew Dunstan
Subject Re: Improved TAP tests by replacing sub-optimal uses of ok() with better Test::More functions
Date
Msg-id 44303f06-7091-47f2-864a-9da939cb5eb5@dunslane.net
Whole thread Raw
In response to Re: Improved TAP tests by replacing sub-optimal uses of ok() with better Test::More functions  (Michael Paquier <michael@paquier.xyz>)
List pgsql-hackers
On 2025-10-14 Tu 4:01 AM, Michael Paquier wrote:
> On Fri, Oct 10, 2025 at 09:33:10AM -0400, Andrew Dunstan wrote:
>> Great, I think this is a definite improvement. I saw someone recently
>> complaining about this overuse of ok(), so thanks for doing the work to
>> improve it.
> Yeah, it's really cool to see someone step up and do all this leg
> work for the existing code.  I have not checked the patch in details
> or if there are missing spots.  Andrew, is that something you are
> planning to do?



I believe Sadhuprasad used this recipe to find these:


   find src contrib -type f -name '*.p[lm]' -print | \
       xargs grep -P '\bok[(].*[~=]'


Maybe that would miss a few, but I bet not too many.


cheers


andrew


--
Andrew Dunstan
EDB: https://www.enterprisedb.com




pgsql-hackers by date:

Previous
From: Jeff Davis
Date:
Subject: Re: new environment variable INITDB_LOCALE_PROVIDER
Next
From: Tomas Vondra
Date:
Subject: Re: Fix overflow of nbatch