Re: pgsql: Add basic TAP tests for psql's tab-completion logic.

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Peter Geoghegan <pg@bowt.ie>
Cc: Robert Haas <robertmhaas@gmail.com>, Christoph Berg <myon@debian.org>, PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Date: 2020-01-04T18:19:28Z
Lists: pgsql-hackers

Attachments

I wrote:
> Meh.  I must be too tired to get the regexp syntax right.

Looking closer, I see that your actual output included *both*
spaces and escape sequences between the table names, so it
needs to be more like the attached.

Also, I apparently misread the control sequences.  What they
look like in the light of morning is

\e[0m		Character Attributes = Normal (no bold, color, etc)
\e[K		Erase in Line to Right

So now I'm thinking again that there must be something about
your colorized setup that triggers use of at least the first one.
But why didn't clearing the relevant environment variables
change anything?

			regards, tom lane

Commits

  1. Skip tab-completion tests if envar SKIP_READLINE_TESTS is defined.

  2. Minor style improvements for tab-completion test.

  3. Avoid reading ~/.inputrc in tab-completion test, and revert other changes.

  4. Don't try to force TERM to a fixed value in tab-completion test.

  5. In tab-completion test, print out the value of TERM before changing it.

  6. Make tab-completion tests more robust.

  7. Further fixes for tab-completion TAP tests.

  8. Add an ugly workaround for a bug in some recent libedit versions.

  9. Add basic TAP tests for psql's tab-completion logic.

  10. Fix running out of file descriptors for spill files.