pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Improve psql tab-completion tests.
Date: Wed, 02 Feb 2022 21:09:14 +0000
Message-ID: <E1nFMsM-0006ee-74@gemulon.postgresql.org> (raw)

Improve psql tab-completion tests.

Fix up recently-added test cases in 010_tab_completion.pl
so that they pass with the rather seriously broken libedit
found in Debian 10 (Buster).

Also, add a few more test cases to improve code coverage.
The total line coverage still looks pretty awful, because
we exercise only a few paths of the giant if-else chain in
psql_completion().  However, this now covers almost all of
the code that isn't in one of those if-blocks.

Discussion: https://postgr.es/m/960764.1643751011@sss.pgh.pa.us

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/d33a81203e95d31e62157c4ae0e00e2198841208

Modified Files
--------------
src/bin/psql/t/010_tab_completion.pl | 103 ++++++++++++++++++++++++++++++++---
1 file changed, 95 insertions(+), 8 deletions(-)



Message-ID: <E1nFMsM-0006ee-74@gemulon.postgresql.org>
Permalink:  ../E1nFMsM-0006ee-74@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1nFMsM-0006ee-74@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: tgl@sss.pgh.pa.us
  Subject: Re: pgsql: Improve psql tab-completion tests.
  In-Reply-To: <E1nFMsM-0006ee-74@gemulon.postgresql.org>
  References: <E1nFMsM-0006ee-74@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox