Re: pgsql: Add basic TAP tests for psql's tab-completion logic.
Dagfinn Ilmari Mannsåker <ilmari@ilmari.org>
From: ilmari@ilmari.org (Dagfinn Ilmari Mannsåker )
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Christoph Berg <myon@debian.org>,
PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Date: 2020-01-03T17:12:09Z
Lists: pgsql-hackers
Attachments
Tom Lane <tgl@sss.pgh.pa.us> writes: > 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? I was going to suggest using Test::More's like() function to do the regex check, but sadly that only escapes things that would break the TAP stream syntax, not non-printables in general. The next obvious thing is Data::Dumper with the 'Useqq' option enabled, which makes it use double-quoted-string escapes (e.g. "\a" for ^G). The attaced patch does that, and also bumps $Test::Builder::Level so the diagnostic references the calling line, and uses diag() instad of note(), so it shows even in non-verbose mode. - ilmari -- "A disappointingly low fraction of the human race is, at any given time, on fire." - Stig Sandbeck Mathisen
Commits
-
Skip tab-completion tests if envar SKIP_READLINE_TESTS is defined.
- e7ee433137b6 13.0 landed
-
Minor style improvements for tab-completion test.
- 8c081a2f4e8e 13.0 landed
-
Avoid reading ~/.inputrc in tab-completion test, and revert other changes.
- 48e03583cd37 13.0 landed
-
Don't try to force TERM to a fixed value in tab-completion test.
- 7e42478186aa 13.0 landed
-
In tab-completion test, print out the value of TERM before changing it.
- 60ab7c80b4de 13.0 landed
-
Make tab-completion tests more robust.
- fac1c04feca6 13.0 landed
-
Further fixes for tab-completion TAP tests.
- 56a3921a2f51 13.0 landed
-
Add an ugly workaround for a bug in some recent libedit versions.
- ddd87d564508 13.0 landed
-
Add basic TAP tests for psql's tab-completion logic.
- 7c015045b914 13.0 cited
-
Fix running out of file descriptors for spill files.
- d20703805383 13.0 cited