1
0
Fork 0
mirror of https://github.com/DBD-SQLite/DBD-SQLite synced 2025-06-07 22:28:47 -04:00

DBD::SQLite - un-TODOd 3 tests which now pass - in rt_29629, rt_29058

This commit is contained in:
Darren Duncan 2010-08-24 23:24:27 +00:00
parent faec7efc79
commit 33ca8e347c
2 changed files with 9 additions and 9 deletions

View file

@ -52,12 +52,12 @@ $ar = $sth->fetchall_arrayref;
is( scalar(@$ar), 2, 'Got 2 results' ); is( scalar(@$ar), 2, 'Got 2 results' );
# and this is what should be tested # and this is what should be tested
TODO: { #TODO: {
local $TODO = 'This test is currently broken again. Wait for a better fix, or use known workarounds shown above'; # local $TODO = 'This test is currently broken again. Wait for a better fix, or use known workarounds shown above';
$ar = $dbh->selectall_arrayref( $ar = $dbh->selectall_arrayref(
'SELECT bar FROM foo GROUP BY bar HAVING count(*) > ?', 'SELECT bar FROM foo GROUP BY bar HAVING count(*) > ?',
undef, 1 undef, 1
); );
# print "4: @$_\n" for @$ar; # print "4: @$_\n" for @$ar;
is( scalar(@$ar), 2, "we got ".(@$ar)." items" ); is( scalar(@$ar), 2, "we got ".(@$ar)." items" );
} #}

View file

@ -34,10 +34,10 @@ my $statement = 'select count(*) from artist where length(name) > ?';
# ...not with bind args # ...not with bind args
$sth = $dbh->prepare($statement); $sth = $dbh->prepare($statement);
ok( $sth->execute(2), "execute: $statement : [2]" ); ok( $sth->execute(2), "execute: $statement : [2]" );
TODO: { #TODO: {
local $TODO = 'This test is currently broken again. Wait for a better fix, or use known workarounds.'; # local $TODO = 'This test is currently broken again. Wait for a better fix, or use known workarounds.';
is( $sth->fetchrow_arrayref->[0], 1, "result of: $statement : [2]" ); is( $sth->fetchrow_arrayref->[0], 1, "result of: $statement : [2]" );
} #}
### it does work, however, from the sqlite3 CLI... ### it does work, however, from the sqlite3 CLI...
# require Shell; # require Shell;
@ -60,10 +60,10 @@ is( $sth->fetchrow_arrayref->[0], 1, "result of: $statement" );
$statement =~ s/1/?/; $statement =~ s/1/?/;
$sth = $dbh->prepare($statement); $sth = $dbh->prepare($statement);
ok( $sth->execute(1), "execute: $statement : [1]" ); ok( $sth->execute(1), "execute: $statement : [1]" );
TODO: { #TODO: {
local $TODO = 'This test is currently broken again. Wait for a better fix, or use known workarounds.'; # local $TODO = 'This test is currently broken again. Wait for a better fix, or use known workarounds.';
is( $sth->fetchrow_arrayref->[0], 1, "result of: $statement [1]" ); is( $sth->fetchrow_arrayref->[0], 1, "result of: $statement [1]" );
} #}
# known workarounds 1: use bind_param explicitly # known workarounds 1: use bind_param explicitly