Re: Tests for psql \g and \o

2022-11-30 Thread Michael Paquier
On Wed, Nov 30, 2022 at 12:33:59PM -0600, Justin Pryzby wrote: > I think you could do that with a perl 0-liner. Right. And this could do something similar to 025_stuck_on_old_timeline.pl in terms of finding the binary for perl. -- Michael signature.asc Description: PGP signature

Re: Tests for psql \g and \o

2022-11-30 Thread Justin Pryzby
On Wed, Nov 30, 2022 at 02:50:16PM +0900, Michael Paquier wrote: > On Wed, Nov 23, 2022 at 09:18:57PM +0100, Daniel Verite wrote: > > PFA a new patch addressing these issues. > > Thanks, the tests part of the main regression test suite look good to > me, so I have applied them after fixing a few

Re: Tests for psql \g and \o

2022-11-30 Thread Daniel Verite
Michael Paquier wrote: > Thanks, the tests part of the main regression test suite look good to > me, so I have applied them after fixing a few typos and tweaking the > style of the test. Thanks! > Regarding the tests with pipes, I had cold feet with the > dependencies on cat for

Re: Tests for psql \g and \o

2022-11-29 Thread Michael Paquier
On Wed, Nov 23, 2022 at 09:18:57PM +0100, Daniel Verite wrote: > PFA a new patch addressing these issues. Thanks, the tests part of the main regression test suite look good to me, so I have applied them after fixing a few typos and tweaking the style of the test. Regarding the tests with pipes,

Re: Tests for psql \g and \o

2022-11-23 Thread Daniel Verite
Michael Paquier wrote: > +psql_like($node, "SELECT 'one' \\g | cat >$g_file", qr//, "one command > \\g"); > +my $c1 = slurp_file($g_file); > +like($c1, qr/one/); > > Windows may not have an equivalent for "cat", no? Note that psql's > 001_basic.pl has no restriction in place for

Re: Tests for psql \g and \o

2022-11-09 Thread Michael Paquier
On Tue, Nov 01, 2022 at 12:42:47PM +0100, Daniel Verite wrote: > It's a follow up to the discussion at [1]. Since this discussion > already has a slot in the CF [2] with a committed patch, let's start a > new separate thread. +psql_like($node, "SELECT 'one' \\g | cat >$g_file", qr//, "one command

Tests for psql \g and \o

2022-11-01 Thread Daniel Verite
Hi, Here's a patch adding regression tests for \g and \o, and TAP tests for \g | program, It's a follow up to the discussion at [1]. Since this discussion already has a slot in the CF [2] with a committed patch, let's start a new separate thread. [1]