pgsql: Make psql/t/030_pager.pl more robust. - Mailing list pgsql-committers

From Tom Lane
Subject pgsql: Make psql/t/030_pager.pl more robust.
Date
Msg-id E1vluqP-000DDF-1m@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Make psql/t/030_pager.pl more robust.

Similarly to the preceding commit, 030_pager.pl was assuming
that patterns it looks for in interactive psql output would
appear by themselves on a line, but that assumption tends to
fall over in builds made --without-readline: the output we
get might have a psql prompt immediately followed by the
expected line of output.

For several of these tests, just checking for the pattern
followed by newline seems sufficient, because we could not
get a false match against the command echo, nor against the
unreplaced command output if the pager fails to be invoked
when expected.  However, that's fairly scary for the test
that was relying on information_schema.referential_constraints:
"\d+" could easily appear at the end of a line in that view.
Let's get rid of that hazard by making a custom test view
instead of using information_schema.referential_constraints.

This test script is new in v19, so no need for back-patch.

Reported-by: Oleg Tselebrovskiy <o.tselebrovskiy@postgrespro.ru>
Author: Oleg Tselebrovskiy <o.tselebrovskiy@postgrespro.ru>
Co-authored-by: Tom Lane <tgl@sss.pgh.pa.us>
Reviewed-by: Soumya S Murali <soumyamurali.work@gmail.com>
Discussion: https://postgr.es/m/db6fdb35a8665ad3c18be01181d44b31@postgrespro.ru

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/6918434a4acb2b14535b3c1be30d306666db7c24

Modified Files
--------------
src/bin/psql/t/030_pager.pl | 43 ++++++++++++++++++++++++++++++++++++++-----
1 file changed, 38 insertions(+), 5 deletions(-)


pgsql-committers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: pgsql: Move shmem allocator's fields from PGShmemHeader to its own stru
Next
From: Michael Paquier
Date:
Subject: pgsql: Fix build inconsistency due to the generation of wait-event code