[Bast-commits] r5707 - SQL-Abstract/1.x/branches/1.50_RC/t
ribasushi at dev.catalyst.perl.org
ribasushi at dev.catalyst.perl.org
Sun Mar 8 20:50:06 GMT 2009
Author: ribasushi
Date: 2009-03-08 20:50:06 +0000 (Sun, 08 Mar 2009)
New Revision: 5707
Modified:
SQL-Abstract/1.x/branches/1.50_RC/t/02where.t
Log:
Failing tests by debolaz
Modified: SQL-Abstract/1.x/branches/1.50_RC/t/02where.t
===================================================================
--- SQL-Abstract/1.x/branches/1.50_RC/t/02where.t 2009-03-08 09:17:06 UTC (rev 5706)
+++ SQL-Abstract/1.x/branches/1.50_RC/t/02where.t 2009-03-08 20:50:06 UTC (rev 5707)
@@ -27,6 +27,15 @@
},
{
+ where => [
+ status => 'completed',
+ user => 'nwiger',
+ ],
+ stmt => " WHERE ( status = ? OR user = ? )",
+ bind => [qw/completed nwiger/],
+ },
+
+ {
where => {
user => 'nwiger',
status => 'completed'
@@ -188,15 +197,30 @@
bind => [ $not_stringifiable ],
},
+ {
+ where => \[ 'foo ?','bar' ],
+ stmt => " WHERE (foo = ?)",
+ bind => [ "bar" ],
+ },
+
+ {
+ where => [ \[ 'foo ?','bar' ] ],
+ stmt => " WHERE (foo = ?)",
+ bind => [ "bar" ],
+ },
+
);
-plan tests => scalar(@handle_tests) + 1;
+plan tests => ( @handle_tests * 2 ) + 1;
for my $case (@handle_tests) {
my $sql = SQL::Abstract->new;
- my($stmt, @bind) = $sql->where($case->{where}, $case->{order});
- is_same_sql_bind($stmt, \@bind, $case->{stmt}, $case->{bind})
+ my($stmt, @bind);
+ lives_ok (sub {
+ ($stmt, @bind) = $sql->where($case->{where}, $case->{order});
+ is_same_sql_bind($stmt, \@bind, $case->{stmt}, $case->{bind});
+ });
}
dies_ok {
More information about the Bast-commits
mailing list