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 Eisentraut <peter.eisentraut@2ndquadrant.com>
Cc: Christoph Berg <myon@debian.org>, Robert Haas <robertmhaas@gmail.com>, Andres Freund <andres@anarazel.de>, Amit Kapila <amit.kapila16@gmail.com>, PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Date: 2020-01-09T16:19:57Z
Lists: pgsql-hackers
Peter Eisentraut <peter.eisentraut@2ndquadrant.com> writes:
> On 2020-01-09 16:50, Tom Lane wrote:
>> That would disable psql's tab completion, command editing, and history
>> altogether, which I doubt is what you want for production builds.
>> If we conclude we can't work around the testing issues for ancient
>> libedit, probably the right answer is to provide a switch to
>> disable just the test.  I've been trying to dance around that
>> conclusion, but maybe we should just do it and move on.

> I think he means something like
> 	make check with_readline=no
> not for the actual build.

Oh, I see.  I'd rather not codify that though, because it risks
problems if that symbol ever gets used any other way.  I was
thinking of making the test script check for some independent
environment variable, say SKIP_READLINE_TESTS.

			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.