Re: Tighten up a few overly lax regexes in pg_dump's tap tests
Daniel Gustafsson <daniel@yesql.se>
From: Daniel Gustafsson <daniel@yesql.se>
To: David Rowley <david.rowley@2ndquadrant.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2019-02-04T12:12:48Z
Lists: pgsql-hackers
> On 4 Feb 2019, at 11:54, David Rowley <david.rowley@2ndquadrant.com> wrote: > > There are a few regexes in pg_dump's tap tests that are neglecting to > escape the dot in "schema.table" type expressions. This could result > in the test passing when it shouldn't. It seems worth putting that > right. +1 for tightening it up, and the patch looks good to me. We may also want to use the + metacharacter instead of * in a few places, since the intent is to always match something, where matching nothing should be considered an error: - qr/^ALTER TEXT SEARCH DICTIONARY dump_test.alt_ts_dict1 OWNER TO .*;/m, + qr/^ALTER TEXT SEARCH DICTIONARY dump_test\.alt_ts_dict1 OWNER TO .*;/m, cheers ./daniel
Commits
-
Align better test output regex with grammar in pg_dump TAP tests
- f339a998ffe6 12.0 landed
-
Tighten some regexes with proper character escaping in pg_dump TAP tests
- d07fb6810e51 12.0 landed