Re: TAP testing for psql's tab completion code - Mailing list pgsql-hackers

From Fabien COELHO
Subject Re: TAP testing for psql's tab completion code
Date
Msg-id alpine.DEB.2.21.1912291950040.14206@pseudo
Whole thread Raw
In response to Re: TAP testing for psql's tab completion code  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: TAP testing for psql's tab completion code
List pgsql-hackers
>> I'm not fan of relying on the configure stuff ("with_readline"), in my
>> Expect version I tested if history capabilities are available from psql
>> itself.
>
> No, I disagree with that.  If configure thinks it built with readline,
> and then the actual binary acts like it doesn't have readline, that's
> a bug that we'd like the tests to detect.

Hmmm. Sure, that's a point.

What about running some tests on an installed version?

>> For the psql coverage patch, I was more ambitious and needed less
>> assumption about the configuration, I only forced -X.
>
> I mainly just duplicated the environment set up by PostgresNode::psql
> as much as it seemed reasonable to.  The -At options are kind of
> irrelevant for what we're going to test here, probably, but why not
> keep the default behavior the same?  I did drop -q since that
> suppresses prompting, and we probably want to test prompt.c using
> this infrastructure.

That is what my patch does: it tests prompts, tab completion, help, 
command options… and I added tests till I covered most psql source.

-- 
Fabien.

pgsql-hackers by date:

Previous
From: Jeff Janes
Date:
Subject: Re: vacuum verbose detail logs are unclear (show debug lines at*start* of each stage?)
Next
From: Tom Lane
Date:
Subject: Re: TAP testing for psql's tab completion code