Skip to content
This repository has been archived by the owner on Mar 9, 2022. It is now read-only.

Commit

Permalink
Quick little test.
Browse files Browse the repository at this point in the history
  • Loading branch information
ccgus committed Aug 3, 2011
1 parent dc359ce commit a6f77c9
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions src/fmdb.m
Expand Up @@ -872,6 +872,39 @@ int main (int argc, const char * argv[]) {

}

{

[dbPool inDatabase:^(FMDatabase *db) {
[db executeUpdate:@"create table likefoo (foo text)"];
[db executeUpdate:@"insert into likefoo values ('hi')"];
[db executeUpdate:@"insert into likefoo values ('hello')"];
[db executeUpdate:@"insert into likefoo values ('not')"];

int count = 0;
FMResultSet *rsl = [db executeQuery:@"select * from likefoo where foo like 'h%'"];
while ([rsl next]) {
count++;
}

FMDBQuickCheck(count == 2);

count = 0;
rsl = [db executeQuery:@"select * from likefoo where foo like ?", @"h%"];
while ([rsl next]) {
count++;
}

FMDBQuickCheck(count == 2);

}];


}





NSLog(@"That was version %@ of sqlite", [FMDatabase sqliteLibVersion]);

[pool release];
Expand Down

0 comments on commit a6f77c9

Please sign in to comment.