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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Christoph Berg <myon(at)debian(dot)org>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pgsql: Add basic TAP tests for psql's tab-completion logic.
Date: 2020-01-03 14:03:47
Message-ID: 14261.1578060227@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

Christoph Berg <myon(at)debian(dot)org> writes:
> Shouldn't this print some "expected foo, got bar" diagnostics instead
> of just dying?

BTW, as far as that goes, we do: see for instance the tail end of

https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=desmoxytes&dt=2020-01-02%2020%3A04%3A03

ok 8 - offer multiple table choices
ok 9 - finish completion of one of multiple table choices
ok 10 - \r works
not ok 11 - complete \DRD<tab> to \drds

# Failed test 'complete \DRD<tab> to \drds'
# at t/010_tab_completion.pl line 64.
# Actual output was "\DRD"
ok 12 - \r works

Not sure why you are not seeing the "Actual output" bit in your log.
I used a "note" command to print it, maybe that's not best practice?

Also, while I'm asking for Perl advice: I can see in my editor that
there's a control-G bell character in that string, but this is far
from obvious on the web page. I'd kind of like to get the report
to escapify control characters so that what comes out is more like

# Actual output was "\DRD^G"
or
# Actual output was "\\DRD\007"

or some such. Anybody know an easy way to do that in Perl?

regards, tom lane

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2020-01-03 14:10:36 Re: pgsql: Add basic TAP tests for psql's tab-completion logic.
Previous Message Tom Lane 2020-01-03 13:52:57 Re: pgsql: Add basic TAP tests for psql's tab-completion logic.

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2020-01-03 14:10:36 Re: pgsql: Add basic TAP tests for psql's tab-completion logic.
Previous Message Tom Lane 2020-01-03 13:52:57 Re: pgsql: Add basic TAP tests for psql's tab-completion logic.