From bcb95ed53618cc9c38643a92a06840f856741c96 Mon Sep 17 00:00:00 2001 From: Vernon Lyon Date: Tue, 29 Sep 2009 15:50:23 +0000 Subject: [PATCH] fixup incorrect TODO passing --- t/rt_29629_sqlite_where_length.t | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/t/rt_29629_sqlite_where_length.t b/t/rt_29629_sqlite_where_length.t index f1f86a6..335dc1e 100644 --- a/t/rt_29629_sqlite_where_length.t +++ b/t/rt_29629_sqlite_where_length.t @@ -32,24 +32,24 @@ is( $sth->fetchrow_arrayref->[0], 17, 'select length result' ); my $statement = 'select count(*) from artist where length(name) > ?'; # ...not with bind args +$sth = $dbh->prepare($statement); +ok( $sth->execute(2), "execute: $statement : [2]" ); TODO: { local $TODO = 'This test is currently broken again. Wait for a better fix, or use known workarounds.'; - $sth = $dbh->prepare($statement); - ok( $sth->execute(2), "execute: $statement : [2]" ); is( $sth->fetchrow_arrayref->[0], 1, "result of: $statement : [2]" ); } +### it does work, however, from the sqlite3 CLI... +# require Shell; +# $Shell::raw = 1; +# is( sqlite3($db, "'$statement;'"), "1\n", 'sqlite3 CLI' ); + # ...works without bind args, though! $statement =~ s/\?/2/; $sth = $dbh->prepare($statement); ok( $sth->execute, "execute: $statement" ); is( $sth->fetchrow_arrayref->[0], 1, "result of: $statement" ); -### it does work, however, from the sqlite3 CLI... -# require Shell; -# $Shell::raw = 1; -# is( sqlite3($db, "'$statement;'"), "1\n", 'sqlite3 CLI' ); - # (Jess Robinson discovered that it passes with an arg of 1) $statement =~ s/2/1/; $sth = $dbh->prepare($statement); @@ -57,11 +57,11 @@ ok( $sth->execute, "execute: $statement" ); is( $sth->fetchrow_arrayref->[0], 1, "result of: $statement" ); # (...but still not with bind args) +$statement =~ s/1/?/; +$sth = $dbh->prepare($statement); +ok( $sth->execute(1), "execute: $statement : [1]" ); TODO: { local $TODO = 'This test is currently broken again. Wait for a better fix, or use known workarounds.'; - $statement =~ s/1/?/; - $sth = $dbh->prepare($statement); - ok( $sth->execute(1), "execute: $statement : [1]" ); is( $sth->fetchrow_arrayref->[0], 1, "result of: $statement [1]" ); }