mirror of
https://github.com/DBD-SQLite/DBD-SQLite
synced 2025-06-07 14:19:10 -04:00
Zero functional changes, simply executed the following: find . -name '*.t' -exec perl -0777 -p -i -e 's|^use t::lib::SQLiteTest|use lib "t/lib";\nuse SQLiteTest|m' {} + Also had to do a manual (but identical) fix in t/01_compile.t
41 lines
678 B
Perl
41 lines
678 B
Perl
#!/usr/bin/perl
|
|
|
|
use strict;
|
|
BEGIN {
|
|
$| = 1;
|
|
$^W = 1;
|
|
}
|
|
|
|
use lib "t/lib";
|
|
use SQLiteTest qw/connect_ok @CALL_FUNCS requires_sqlite/;
|
|
use Test::More;
|
|
|
|
BEGIN { requires_sqlite('3.7.10') }
|
|
|
|
use Test::NoWarnings;
|
|
|
|
plan tests => 6 * @CALL_FUNCS + 1;
|
|
|
|
for my $func (@CALL_FUNCS) {
|
|
{
|
|
my $db = filename($func);
|
|
ok !$db, "in-memory database";
|
|
}
|
|
|
|
{
|
|
my $db = filename($func, dbfile => '');
|
|
ok !$db, "temporary database";
|
|
}
|
|
|
|
{
|
|
my $db = filename($func, dbfile => 'test.db');
|
|
like $db => qr/test\.db[\d]*$/i, "test.db";
|
|
unlink $db;
|
|
}
|
|
}
|
|
|
|
sub filename {
|
|
my $func = shift;
|
|
my $dbh = connect_ok(@_);
|
|
$dbh->$func('db_filename');
|
|
}
|