Re: [PROPOSAL] TAP test example - Mailing list pgsql-hackers

From Nikolay Shaplov
Subject Re: [PROPOSAL] TAP test example
Date
Msg-id 9992861.h1qeqt5uIG@nataraj-amd64
Whole thread Raw
In response to Re: [PROPOSAL] TAP test example  (Jim Nasby <Jim.Nasby@BlueTreble.com>)
Responses Re: [PROPOSAL] TAP test example  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
В письме от 19 ноября 2015 09:39:41 пользователь Jim Nasby написал:
> On 11/19/15 8:42 AM, Nikolay Shaplov wrote:
> > +sub psql_ok
> > +{
> > +    my $db = shift;
> > +    my $sql = shift;
> > +    my $comment = shift;
>
> Isn't the preferred method of parameter assignment to use @_?
Hm... it is the way I wrote perl programs. There is more then one way to do it
in perl, you know ;-) I think that this way is more understandable for others.
But this is not the issue. We can change it any way we like. The question do
we need such example at all, or no?

> Also, I'd think one of the examples should use DBI, since presumably one
> of the big benefits to tap is not dealing with raw psql output...

I wrote this example based on ssl TAP test. There was no DBI there. And I
think it was done for purpose. If we add DBI to tests, then we should add it
to build dependencies. And it is not a good idea, and so not a good example.

--
Nikolay Shaplov
Postgres Professional: http://www.postgrespro.com
Russian Postgres Company



pgsql-hackers by date:

Previous
From: Jim Nasby
Date:
Subject: Re: [PROPOSAL] TAP test example
Next
From: Robert Haas
Date:
Subject: Re: [PATCH] Skip ALTER x SET SCHEMA if the schema didn't change