Re: pgsql: 001_libpq_pipeline.pl: use Test::Differences if available

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: Re: pgsql: 001_libpq_pipeline.pl: use Test::Differences if available
Date: 2023-03-09 11:03:56
Message-ID: 20230309110356.h6muf4xjem3ylidd@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

On 2023-Mar-09, Alvaro Herrera wrote:

> On 2023-Mar-08, Andrew Dunstan wrote:
>
> > something like this should do the trick:
> >
> >
> >    eval { require Test::Differences; Test::Differences->import;
> > unified_diff; 1; };
> >
> >    *eq_or_diff = \&is if $@;
>
> Hmm, I just grabbed the code from the Test::Differences manual, but I
> agree that avoiding the stringy eval is better. Let me try it out.

It seemed to work fine for me, so pushed. Thanks for the suggestion.

--
Álvaro Herrera 48°01'N 7°57'E — https://www.EnterpriseDB.com/

In response to

Browse pgsql-committers by date

  From Date Subject
Next Message Stephen Frost 2023-03-09 15:33:35 pgsql: For Kerberos testing, disable reverse DNS lookup
Previous Message Alvaro Herrera 2023-03-09 11:02:49 pgsql: Avoid criticizable perl code