File: 02cr_table.t

package info (click to toggle)
libdbd-sqlite3-perl 1.08-1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 1,984 kB
  • ctags: 2,870
  • sloc: ansic: 33,006; perl: 1,731; makefile: 44
file content (18 lines) | stat: -rw-r--r-- 456 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
$|++;
use strict;
use Test;
BEGIN { plan tests => 4 }
use DBI;
unlink("foo");
my $dbh = DBI->connect("dbi:SQLite:dbname=foo", "", "");
ok($dbh);
$dbh->{AutoCommit} = 1;
$dbh->do("CREATE TABLE f (f1, f2, f3)");
my $sth = $dbh->prepare("SELECT f.f1, f.* FROM f");
ok($sth->execute());
my $names = $sth->{NAME};
ok(@$names == 4);
print("# ", join(', ', @$names), "\n");
ok($names->[0] eq "f1");	# make sure the "f." is removed
$sth->finish;
$dbh->disconnect;