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

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: pgsql: 001_libpq_pipeline.pl: use Test::Differences if available
Дата
Msg-id 20230309110356.h6muf4xjem3ylidd@alvherre.pgsql
обсуждение исходный текст
Ответ на Re: pgsql: 001_libpq_pipeline.pl: use Test::Differences if available  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
Список 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/



В списке pgsql-committers по дате отправления:

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: pgsql: Avoid criticizable perl code
Следующее
От: Stephen Frost
Дата:
Сообщение: pgsql: For Kerberos testing, disable reverse DNS lookup