Re: Tighten up a few overly lax regexes in pg_dump's tap tests

From: David Rowley <david(dot)rowley(at)2ndquadrant(dot)com>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: Daniel Gustafsson <daniel(at)yesql(dot)se>, Tels <nospam-pg-abuse(at)bloodgate(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Tighten up a few overly lax regexes in pg_dump's tap tests
Date: 2019-02-08 01:00:49
Message-ID: CAKJS1f-6F0fB3EtJ3gUpPumajgfy6F6uYdM9ku1OUvaivR_MoQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, 8 Feb 2019 at 13:04, Michael Paquier <michael(at)paquier(dot)xyz> wrote:
>
> On Thu, Feb 07, 2019 at 03:33:54PM +0100, Daniel Gustafsson wrote:
> > Correct. The idea was to maintain readability while making the regex a bit
> > better, without any claims to make it perfect.
>
> Agreed with your position. I see no point is making all the
> expressions unreadable for little gain. What Daniel proposed upthread
> had a better balance in my opinion than the previous behavior, without
> sacrifying the readability of anything and still improving the error
> detection.

FWIW, this was the first time I'd really worked with TAP tests. I had
been looking into it because I needed to add a new test.

I was surprised to see it working this way and not just doing a diff
with some known good output. I'm maybe just missing the reason that's
not possible, but to me, it seems a bit less error-prone than trying
to ensure an exact match with a bunch of regular expressions.

--
David Rowley http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2019-02-08 01:09:44 Re: Problem while updating a foreign table pointing to a partitioned table on foreign server
Previous Message Michael Paquier 2019-02-08 00:43:13 Re: [HACKERS] REINDEX CONCURRENTLY 2.0