[Dbix-class] DBIx::Class v0.06999_04 order by quotes test failure

Scott Karns scott at karnstech.com
Fri Jun 30 22:32:13 CEST 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Matt S Trout wrote:
> 
> Could you find
> 
>         my $warnings = '';
>         local $SIG{__WARN__} = sub { $warnings .= $_[0] };
>         my $first = eval{ $rs->first() };
>         ok( $warnings =~ /ORDER BY terms/, "Problem with ORDER BY quotes" );
> 
> in the file and add
> 
>         warn $warnings;
> 
> at the end of that block so we can see what you actually got?
> 
OK, done, but I don't see anything for $warnings!

The modified code in 19quotes.t:
$rs = DBICTest::CD->search({},
            { 'order_by' => 'year DESC'});
{
       my $warnings = '';
       local $SIG{__WARN__} = sub { $warnings .= $_[0] };
       my $first = eval{ $rs->first() };
       ok( $warnings =~ /ORDER BY terms/, "Problem with ORDER BY quotes" );
       warn $warnings;
}

The output:
t/19quotes......................ok 2/6
#   Failed test 'Problem with ORDER BY quotes'
#   in t/19quotes.t at line 34.
t/19quotes......................NOK 3# Looks like you failed 1 test of 6.
t/19quotes......................dubious
        Test returned status 1 (wstat 256, 0x100)
DIED. FAILED test 3
        Failed 1/6 tests, 83.33% okay

Just to be sure, I did nothing more than modify 19quotes.t as shown above,
then exec './Build test'


- --
Scott Karns

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)
Comment: Using GnuPG with Mandriva - http://enigmail.mozdev.org

iD8DBQFEpYpNbeNsprvEu+kRAtPmAKCEML417eYIoWyvX78hYMxsjCT4BwCfXFCn
6BdzPp6iuOBj3isrUeC9OP0=
=adoy
-----END PGP SIGNATURE-----



More information about the Dbix-class mailing list