mirror of
https://github.com/DBD-SQLite/DBD-SQLite
synced 2025-06-07 22:28:47 -04:00
25 lines
495 B
Perl
25 lines
495 B
Perl
#!/usr/bin/perl
|
|
|
|
use strict;
|
|
BEGIN {
|
|
$| = 1;
|
|
$^W = 1;
|
|
}
|
|
|
|
use Test::More tests => 4;
|
|
use DBI;
|
|
|
|
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
|
|
undef $sth;
|
|
$dbh->disconnect;
|
|
|
|
END { unlink 'foo' }
|