On 2018-Dec-27, Daniel Verite wrote:
>
> Maybe I misunderstand something, as I'm not familiar with TAP tests,
> but hasn't psql no such test to begin with, as opposed to the
> other programs in src/bin that have a t/ directory?
That's correct. psql does have some tests though, in
src/test/regress/sql/psql.sql and psql_crosstab.sql. It's also tested
indirectly because it's used to run all the src/test/regress files.
If you want to add more tests and increase coverage, that's a good goal,
but keep in mind those other files that can also be used. It doesn't
all have to be TAP.
Some things such as help.c, sql_help.c are hard to test. describe.c
could use more coverage for sure, but lots of it is version-specific,
which makes things harder.
--
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services