Re: list_tables / table_info failures ...

Jens Rehsack <[email protected]>
Newsgroups gmane.comp.lang.perl.modules.dbi.sybase.devel
Message-ID <CAANR1XGfMqvzzeyLsO2W-N1wRC7iJbrqBoLRMCdpLJ9PLYsb+g@mail.gmail.com>
2012/10/5 H.Merijn Brand <[email protected]>:
> On Fri, 05 Oct 2012 15:54:31 +0200, Jens Rehsack
> <[email protected]> wrote:
>
>> Hi Merijn,
>>
>> We have to think about both tests ...
>
> my @tables = $dbh->func( "list_tables" );
> is_deeply( \@tables, ["000_just_testing", $tbl], "Listing tables gives test table" );
>
> =>
>
> my @tables = sort $dbh->func ("list_tables");
> is_deeply (\@tables, [sort "000_just_testing", $tbl], "Listing tables gives test table");

Looks good, but will not work for DBD::Sponge result from table_info :(

> why can't we make list_tables return always sorted?

Probably we can - but it costs time and no one did it (even I never
thought about).

>> t/49dbd_file.t .................. 1/?
>> #   Failed test 'Listing tables gives test table'
>> #   at t/49dbd_file.t line 126.
>> #     Structures begin differing at:
>> #          $got->[0] = 'db_25542_'
>> #     $expected->[0] = '000_just_testing'
>>
>> #   Failed test 'table_info gives test table'
>> #   at t/49dbd_file.t line 130.
>> #     Structures begin differing at:
>> #          $got->[0][0][2] = 'db_25542_'
>> #     $expected->[0][0][2] = '000_just_testing'
>> # Looks like you failed 2 tests of 43.
>> t/49dbd_file.t .................. Dubious, test returned 2 (wstat 512,
>> 0x200)
>> Failed 2/43 subtests
>>
>> The order is vice versa than expected.
>>
>> But is early enough when your back! Just keeping it in mind (we both!).
>>
>> /Jens
>
>
> --
> H.Merijn Brand  http://tux.nl   Perl Monger  http://amsterdam.pm.org/
> using perl5.00307 .. 5.17   porting perl5 on HP-UX, AIX, and openSUSE
> http://mirrors.develooper.com/hpux/        http://www.test-smoke.org/
> http://qa.perl.org   http://www.goldmark.org/jeff/stupid-disclaimers/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.