r12625@evoc8 (orig r2780): dwc | 2006-09-14 09:29:02 -0500
Fix for recent SQLite versions interpreting single quotes as string literals
$rs = DBICTest::CD->search({},
{ 'order_by' => 'year DESC'});
{
- my $warnings = '';
- local $SIG{__WARN__} = sub { $warnings .= $_[0] };
- my $first = eval{ $rs->first() };
- like( $warnings, qr/no such column: year DESC/, "Problem with ORDER BY quotes" );
+ eval{ $rs->first() };
- like( $@, qr/ORDER BY terms/, "Problem with ORDER BY quotes" );
++ like( $@, qr/no such column: year DESC/, "Problem with ORDER BY quotes" );
}
my $order = 'year DESC';
$rs = DBICTest::CD->search({},
{ 'order_by' => 'year DESC'});
{
- my $warnings = '';
- local $SIG{__WARN__} = sub { $warnings .= $_[0] };
- my $first = eval{ $rs->first() };
- like( $warnings, qr/no such column: year DESC/, "Problem with ORDER BY quotes" );
+ eval { $rs->first() };
- like( $@, qr/ORDER BY terms/, "Problem with ORDER BY quotes" );
++ like( $@, qr/no such column: year DESC/, "Problem with ORDER BY quotes" );
}
my $order = 'year DESC';