mirror of
https://github.com/DBD-SQLite/DBD-SQLite
synced 2025-06-07 22:28:47 -04:00
All tests run under the same Perl environment
(autoflush on, and warnings enabled via $^W = 1)
This commit is contained in:
parent
c90209571c
commit
a3ff0b1f7c
32 changed files with 417 additions and 298 deletions
23
Changes
23
Changes
|
@ -1,18 +1,23 @@
|
||||||
Revision history for Perl extension DBD-SQLite.
|
Revision history for Perl extension DBD-SQLite.
|
||||||
|
|
||||||
1.19_06 not yet released
|
1.19_06 not yet released
|
||||||
- fixed a segv with an error function under x86 linux
|
- Fixed a segv with an error function under x86 linux
|
||||||
(and hopefully Mac OSX). (TOKUHIROM)
|
(and hopefully Mac OSX). (TOKUHIROM)
|
||||||
- fixed yet another segv while testing DBIC reconnection (DMAKI)
|
- Fixed yet another segv while testing DBIC reconnection (DMAKI)
|
||||||
- minor test improvement (ISHIGAKI)
|
- Switched from Test.pm to Test::More (though there're still
|
||||||
- switched from Test.pm to Test::More (though there're still
|
some tests that don't use Test::More) (ISHIGAKI)
|
||||||
some tests that don't use Test::More)
|
- Added "use strict" to some. (ISHIGAKI)
|
||||||
- added "use strict" to some.
|
- Added a cleanup block to each test to allow it run clean and
|
||||||
- added a cleanup block to each test to allow it run clean and
|
separately. (ISHIGAKI)
|
||||||
separately.
|
- Adding an explicit minimum Perl version to the Makefile.PL (ADAMK)
|
||||||
|
- Setting configure_requires dependencies for File::Spec
|
||||||
|
- Splitting the LICENSE key into it's own MakeMaker
|
||||||
|
version-dependency conditional (ADAMK)
|
||||||
|
- All tests run under the same Perl environment
|
||||||
|
(autoflush on, and warnings enabled via $^W = 1) (ADAMK)
|
||||||
|
|
||||||
1.19_05 Thu 2 Apr 2009
|
1.19_05 Thu 2 Apr 2009
|
||||||
- DBD::SQLite::Amalgamation 3.6.1.2 and DBD::SQLite 1.19_04
|
- DBD::SQLite::Amalgamation 3.6.1.2 and DBD::SQLite 1.19
|
||||||
should be feature identical now.
|
should be feature identical now.
|
||||||
- Added collations from DBD::SQLite::Amalgamation (CORION)
|
- Added collations from DBD::SQLite::Amalgamation (CORION)
|
||||||
- Removed statement handle activation after "execute" if
|
- Removed statement handle activation after "execute" if
|
||||||
|
|
82
Makefile.PL
82
Makefile.PL
|
@ -3,6 +3,20 @@ use strict;
|
||||||
use ExtUtils::MakeMaker;
|
use ExtUtils::MakeMaker;
|
||||||
use Config;
|
use Config;
|
||||||
|
|
||||||
|
# Some dependencies need to be more aggressive on Windows
|
||||||
|
sub WINLIKE () {
|
||||||
|
return 1 if $^O eq 'MSWin32';
|
||||||
|
return 1 if $^O eq 'cygwin';
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
|
||||||
|
# Make setting optional MakeMaker parameters more readable
|
||||||
|
sub OPTIONAL {
|
||||||
|
return () unless $ExtUtils::MakeMaker::VERSION ge shift;
|
||||||
|
return @_;
|
||||||
|
}
|
||||||
|
|
||||||
|
# Are we upgrading from a critically out of date version?
|
||||||
eval {
|
eval {
|
||||||
require DBD::SQLite;
|
require DBD::SQLite;
|
||||||
if ( $DBD::SQLite::VERSION < 1.0 ) {
|
if ( $DBD::SQLite::VERSION < 1.0 ) {
|
||||||
|
@ -46,18 +60,22 @@ EOT
|
||||||
# 2009/04/02
|
# 2009/04/02
|
||||||
# But why do we need to use an older, system-installed library?
|
# But why do we need to use an older, system-installed library?
|
||||||
# Let's always use the bundled one. -- ISHIGAKI
|
# Let's always use the bundled one. -- ISHIGAKI
|
||||||
|
# 2009/04/03
|
||||||
require File::Spec;
|
# For the moment, while we're fixing things, this is reasonable.
|
||||||
|
# However, logic in the form "I lack knowledge, thereforce lets do
|
||||||
|
# it this way" is not a sufficiently robust decision making process.
|
||||||
|
# Let's find out the full story first, so we can make an informed
|
||||||
|
# decision to whether to do this. -- ADAMK
|
||||||
my ($force_local, $sqlite_base, $sqlite_lib, $sqlite_inc);
|
my ($force_local, $sqlite_base, $sqlite_lib, $sqlite_inc);
|
||||||
|
if ( 0 ) {
|
||||||
=begin dont_try_looking_for_a_buggy_library
|
require File::Spec;
|
||||||
if ( $sqlite_base = (grep(/SQLITE_LOCATION=.*/, @ARGV))[0] ) {
|
if ( $sqlite_base = (grep(/SQLITE_LOCATION=.*/, @ARGV))[0] ) {
|
||||||
$sqlite_base =~ /=(.*)/;
|
$sqlite_base =~ /=(.*)/;
|
||||||
$sqlite_base = $1;
|
$sqlite_base = $1;
|
||||||
$sqlite_lib = File::Spec->catdir( $sqlite_base, 'lib' );
|
$sqlite_lib = File::Spec->catdir( $sqlite_base, 'lib' );
|
||||||
$sqlite_inc = File::Spec->catdir( $sqlite_base, 'include' );
|
$sqlite_inc = File::Spec->catdir( $sqlite_base, 'include' );
|
||||||
}
|
}
|
||||||
if ( $force_local = (grep(/USE_LOCAL_SQLITE=.*/, @ARGV))[0] ) {
|
if ( $force_local = (grep(/USE_LOCAL_SQLITE=.*/, @ARGV))[0] ) {
|
||||||
$force_local =~ /=(.*)/;
|
$force_local =~ /=(.*)/;
|
||||||
$force_local = "$1" ? 1 : 0;
|
$force_local = "$1" ? 1 : 0;
|
||||||
if ( $force_local ) {
|
if ( $force_local ) {
|
||||||
|
@ -65,10 +83,10 @@ if ( $force_local = (grep(/USE_LOCAL_SQLITE=.*/, @ARGV))[0] ) {
|
||||||
undef $sqlite_lib;
|
undef $sqlite_lib;
|
||||||
undef $sqlite_inc;
|
undef $sqlite_inc;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# Now check for a compatible sqlite3
|
# Now check for a compatible sqlite3
|
||||||
unless ( $force_local ) {
|
unless ( $force_local ) {
|
||||||
my ($dir, $file, $fh, $version);
|
my ($dir, $file, $fh, $version);
|
||||||
print "Checking installed SQLite version...\n" if $ENV{AUTOMATED_TESTING};
|
print "Checking installed SQLite version...\n" if $ENV{AUTOMATED_TESTING};
|
||||||
if ( $sqlite_inc ) {
|
if ( $sqlite_inc ) {
|
||||||
|
@ -106,8 +124,8 @@ unless ( $force_local ) {
|
||||||
} else {
|
} else {
|
||||||
print "Looks good\n" if $ENV{AUTOMATED_TESTING};
|
print "Looks good\n" if $ENV{AUTOMATED_TESTING};
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
=cut
|
|
||||||
|
|
||||||
# Use always the bundled one.
|
# Use always the bundled one.
|
||||||
# XXX: ... and this message should be more informative.
|
# XXX: ... and this message should be more informative.
|
||||||
|
@ -115,7 +133,6 @@ unless ( $force_local ) {
|
||||||
$force_local = 1;
|
$force_local = 1;
|
||||||
print "We're using the bundled sqlite library.\n" if $ENV{AUTOMATED_TESTING};
|
print "We're using the bundled sqlite library.\n" if $ENV{AUTOMATED_TESTING};
|
||||||
|
|
||||||
|
|
||||||
@ARGV = grep( ! /SQLITE_LOCATION|USE_LOCAL_SQLITE/, @ARGV );
|
@ARGV = grep( ! /SQLITE_LOCATION|USE_LOCAL_SQLITE/, @ARGV );
|
||||||
|
|
||||||
|
|
||||||
|
@ -157,6 +174,21 @@ unless ( $Config{usethreads} ) {
|
||||||
push @CC_DEFINE, '-DTHREADSAFE=0';
|
push @CC_DEFINE, '-DTHREADSAFE=0';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
my @CC_OPTIONS = (
|
||||||
|
INC => join( ' ', @CC_INC ),
|
||||||
|
DEFINE => join( ' ', @CC_DEFINE ),
|
||||||
|
( @CC_LIBS ? (
|
||||||
|
LIBS => join( ' ', @CC_LIBS )
|
||||||
|
) : () ),
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#####################################################################
|
||||||
|
# Hand off to ExtUtils::MakeMaker
|
||||||
|
|
||||||
WriteMakefile(
|
WriteMakefile(
|
||||||
NAME => 'DBD::SQLite',
|
NAME => 'DBD::SQLite',
|
||||||
ABSTRACT => 'Self Contained SQLite RDBMS in a DBI Driver',
|
ABSTRACT => 'Self Contained SQLite RDBMS in a DBI Driver',
|
||||||
|
@ -165,14 +197,21 @@ WriteMakefile(
|
||||||
'DBI' => '1.21',
|
'DBI' => '1.21',
|
||||||
'Test::More' => '0.42',
|
'Test::More' => '0.42',
|
||||||
},
|
},
|
||||||
( $ExtUtils::MakeMaker::VERSION ge '6.46'? (
|
OPTIONAL( '6.48',
|
||||||
'LICENSE' => 'perl',
|
MIN_PERL_VERSION => '5.005',
|
||||||
'META_MERGE' => {
|
),
|
||||||
'configure_requires' => {
|
OPTIONAL( '6.31',
|
||||||
DBI => '1.21',
|
LICENSE => 'perl',
|
||||||
|
),
|
||||||
|
OPTIONAL( '6.46',
|
||||||
|
META_MERGE => {
|
||||||
|
configure_requires => {
|
||||||
|
'ExtUtils::MakeMaker' => '6.48',
|
||||||
|
'File::Spec' => (WINLIKE ? '3.27' : '0.82'),
|
||||||
|
'DBI' => '1.21',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
) : () ),
|
),
|
||||||
OBJECT => ( $force_local ? '$(O_FILES)' : 'SQLite.o dbdimp.o' ),
|
OBJECT => ( $force_local ? '$(O_FILES)' : 'SQLite.o dbdimp.o' ),
|
||||||
OPTIMIZE => '-O2',
|
OPTIMIZE => '-O2',
|
||||||
clean => {
|
clean => {
|
||||||
|
@ -180,11 +219,8 @@ WriteMakefile(
|
||||||
},
|
},
|
||||||
PL_FILES => {},
|
PL_FILES => {},
|
||||||
EXE_FILES => [],
|
EXE_FILES => [],
|
||||||
INC => join( ' ', @CC_INC ),
|
|
||||||
DEFINE => join( ' ', @CC_DEFINE ),
|
@CC_OPTIONS,
|
||||||
( @CC_LIBS ? (
|
|
||||||
LIBS => join( ' ', @CC_LIBS )
|
|
||||||
) : () ),
|
|
||||||
);
|
);
|
||||||
|
|
||||||
package MY;
|
package MY;
|
||||||
|
|
13
t/00basic.t
13
t/00basic.t
|
@ -1,4 +1,11 @@
|
||||||
|
#!/usr/bin/perl
|
||||||
|
|
||||||
use strict;
|
use strict;
|
||||||
use Test::More;
|
BEGIN {
|
||||||
BEGIN { plan tests => 1 }
|
$| = 1;
|
||||||
BEGIN { use_ok('DBD::SQLite') }
|
$^W = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
use Test::More tests => 1;
|
||||||
|
|
||||||
|
use_ok('DBD::SQLite');
|
||||||
|
|
11
t/01logon.t
11
t/01logon.t
|
@ -1,7 +1,14 @@
|
||||||
|
#!/usr/bin/perl
|
||||||
|
|
||||||
use strict;
|
use strict;
|
||||||
use Test::More;
|
BEGIN {
|
||||||
BEGIN { plan tests => 5 }
|
$| = 1;
|
||||||
|
$^W = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
use Test::More tests => 5;
|
||||||
use DBI;
|
use DBI;
|
||||||
|
|
||||||
my $dbh = DBI->connect("dbi:SQLite:dbname=foo", "", "");
|
my $dbh = DBI->connect("dbi:SQLite:dbname=foo", "", "");
|
||||||
ok($dbh);
|
ok($dbh);
|
||||||
ok($dbh->{sqlite_version});
|
ok($dbh->{sqlite_version});
|
||||||
|
|
|
@ -1,8 +1,14 @@
|
||||||
$|++;
|
#!/usr/bin/perl
|
||||||
|
|
||||||
use strict;
|
use strict;
|
||||||
use Test::More;
|
BEGIN {
|
||||||
BEGIN { plan tests => 4 }
|
$| = 1;
|
||||||
|
$^W = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
use Test::More tests => 4;
|
||||||
use DBI;
|
use DBI;
|
||||||
|
|
||||||
my $dbh = DBI->connect("dbi:SQLite:dbname=foo", "", "");
|
my $dbh = DBI->connect("dbi:SQLite:dbname=foo", "", "");
|
||||||
ok($dbh);
|
ok($dbh);
|
||||||
$dbh->{AutoCommit} = 1;
|
$dbh->{AutoCommit} = 1;
|
||||||
|
|
11
t/03insert.t
11
t/03insert.t
|
@ -1,7 +1,14 @@
|
||||||
|
#!/usr/bin/perl
|
||||||
|
|
||||||
use strict;
|
use strict;
|
||||||
use Test::More;
|
BEGIN {
|
||||||
|
$| = 1;
|
||||||
|
$^W = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
use Test::More tests => 11;
|
||||||
use DBI;
|
use DBI;
|
||||||
BEGIN { plan tests => 11 }
|
|
||||||
my $dbh = DBI->connect("dbi:SQLite:dbname=foo", "", "", {AutoCommit => 1});
|
my $dbh = DBI->connect("dbi:SQLite:dbname=foo", "", "", {AutoCommit => 1});
|
||||||
ok($dbh);
|
ok($dbh);
|
||||||
$dbh->do("CREATE TABLE f (f1, f2, f3)");
|
$dbh->do("CREATE TABLE f (f1, f2, f3)");
|
||||||
|
|
11
t/04select.t
11
t/04select.t
|
@ -1,7 +1,14 @@
|
||||||
|
#!/usr/bin/perl
|
||||||
|
|
||||||
use strict;
|
use strict;
|
||||||
use Test::More;
|
BEGIN {
|
||||||
BEGIN { plan tests => 21 }
|
$| = 1;
|
||||||
|
$^W = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
use Test::More tests => 21;
|
||||||
use DBI;
|
use DBI;
|
||||||
|
|
||||||
my $dbh = DBI->connect("dbi:SQLite:dbname=foo", "", "", { RaiseError => 1, AutoCommit => 1 });
|
my $dbh = DBI->connect("dbi:SQLite:dbname=foo", "", "", { RaiseError => 1, AutoCommit => 1 });
|
||||||
ok($dbh);
|
ok($dbh);
|
||||||
$dbh->do("CREATE TABLE f (f1, f2, f3)");
|
$dbh->do("CREATE TABLE f (f1, f2, f3)");
|
||||||
|
|
11
t/05tran.t
11
t/05tran.t
|
@ -1,6 +1,13 @@
|
||||||
|
#!/usr/bin/perl
|
||||||
|
|
||||||
use strict;
|
use strict;
|
||||||
use Test::More;
|
BEGIN {
|
||||||
BEGIN { plan tests => 2 }
|
$| = 1;
|
||||||
|
$^W = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
use Test::More tests => 2;
|
||||||
|
|
||||||
use DBI;
|
use DBI;
|
||||||
unlink("foo");
|
unlink("foo");
|
||||||
my $dbh = DBI->connect("dbi:SQLite:dbname=foo", "", "",
|
my $dbh = DBI->connect("dbi:SQLite:dbname=foo", "", "",
|
||||||
|
|
10
t/06error.t
10
t/06error.t
|
@ -1,6 +1,12 @@
|
||||||
|
#!/usr/bin/perl
|
||||||
|
|
||||||
use strict;
|
use strict;
|
||||||
use Test::More;
|
BEGIN {
|
||||||
BEGIN { plan tests => 2 }
|
$| = 1;
|
||||||
|
$^W = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
use Test::More tests => 2;
|
||||||
use DBI;
|
use DBI;
|
||||||
|
|
||||||
unlink('foo');
|
unlink('foo');
|
||||||
|
|
10
t/07busy.t
10
t/07busy.t
|
@ -1,8 +1,12 @@
|
||||||
#!perl
|
#!/usr/bin/perl
|
||||||
|
|
||||||
use strict;
|
use strict;
|
||||||
use Test::More;
|
BEGIN {
|
||||||
BEGIN { plan tests => 8 }
|
$| = 1;
|
||||||
|
$^W = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
use Test::More tests => 8;
|
||||||
use DBI;
|
use DBI;
|
||||||
|
|
||||||
my $db = DBI->connect('dbi:SQLite:foo', '', '',
|
my $db = DBI->connect('dbi:SQLite:foo', '', '',
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
use strict;
|
use strict;
|
||||||
BEGIN {
|
BEGIN {
|
||||||
$| = 1;
|
$| = 1;
|
||||||
|
$^W = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
use Test::More tests => 18;
|
use Test::More tests => 18;
|
||||||
|
|
|
@ -1,71 +1,72 @@
|
||||||
|
#!/usr/bin/perl
|
||||||
|
|
||||||
use strict;
|
use strict;
|
||||||
|
BEGIN {
|
||||||
package count_aggr;
|
$| = 1;
|
||||||
|
$^W = 1;
|
||||||
sub new {
|
|
||||||
bless { count => 0 }, shift;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
sub step {
|
use Test::More tests => 15;
|
||||||
|
use DBI;
|
||||||
|
|
||||||
|
# Create the aggregate test packages
|
||||||
|
SCOPE: {
|
||||||
|
package count_aggr;
|
||||||
|
|
||||||
|
sub new {
|
||||||
|
bless { count => 0 }, shift;
|
||||||
|
}
|
||||||
|
|
||||||
|
sub step {
|
||||||
$_[0]{count}++;
|
$_[0]{count}++;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
sub finalize {
|
sub finalize {
|
||||||
my $c = $_[0]{count};
|
my $c = $_[0]{count};
|
||||||
$_[0]{count} = undef;
|
$_[0]{count} = undef;
|
||||||
|
|
||||||
return $c;
|
return $c;
|
||||||
}
|
}
|
||||||
|
|
||||||
package obj_aggregate;
|
package obj_aggregate;
|
||||||
|
|
||||||
sub new {
|
sub new {
|
||||||
bless { count => 0 }, shift;
|
bless { count => 0 }, shift;
|
||||||
}
|
}
|
||||||
|
|
||||||
sub step {
|
sub step {
|
||||||
$_[0]{count}++
|
$_[0]{count}++ if defined $_[1];
|
||||||
if defined $_[1];
|
}
|
||||||
}
|
|
||||||
|
|
||||||
sub finalize {
|
sub finalize {
|
||||||
my $c = $_[0]{count};
|
my $c = $_[0]{count};
|
||||||
$_[0]{count} = undef;
|
$_[0]{count} = undef;
|
||||||
return $c;
|
return $c;
|
||||||
}
|
}
|
||||||
|
|
||||||
package fail_aggregate;
|
package fail_aggregate;
|
||||||
|
|
||||||
sub new {
|
sub new {
|
||||||
my $class = shift;
|
my $class = shift;
|
||||||
if ( ref $class ) {
|
if ( ref $class ) {
|
||||||
die "new() failed on request"
|
die "new() failed on request" if $class->{'fail'} eq 'new';
|
||||||
if $class->{'fail'} eq 'new';
|
return undef if $class->{'fail'} eq 'undef';
|
||||||
return undef
|
|
||||||
if $class->{'fail'} eq 'undef';
|
|
||||||
return bless { %$class }, ref $class;
|
return bless { %$class }, ref $class;
|
||||||
} else {
|
} else {
|
||||||
return bless { 'fail' => $_[0] }, $class;
|
return bless { 'fail' => $_[0] }, $class;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
sub step {
|
||||||
|
die "step() failed on request" if $_[0]{fail} eq 'step';
|
||||||
|
}
|
||||||
|
|
||||||
|
sub finalize {
|
||||||
|
die "finalize() failed on request" if $_[0]{fail} eq 'finalize';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
sub step {
|
|
||||||
die "step() failed on request"
|
|
||||||
if $_[0]{fail} eq 'step';
|
|
||||||
}
|
|
||||||
|
|
||||||
sub finalize {
|
|
||||||
die "finalize() failed on request"
|
|
||||||
if $_[0]{fail} eq 'finalize';
|
|
||||||
}
|
|
||||||
|
|
||||||
package main;
|
|
||||||
|
|
||||||
use Test::More;
|
|
||||||
BEGIN { plan tests => 15 }
|
|
||||||
use DBI;
|
|
||||||
|
|
||||||
my $dbh = DBI->connect("dbi:SQLite:dbname=foo", "", "", { PrintError => 0 } );
|
my $dbh = DBI->connect("dbi:SQLite:dbname=foo", "", "", { PrintError => 0 } );
|
||||||
ok($dbh);
|
ok($dbh);
|
||||||
|
|
||||||
|
|
|
@ -1,12 +1,14 @@
|
||||||
#!/usr/local/bin/perl
|
#!/usr/bin/perl
|
||||||
#
|
|
||||||
# $Id: 10dsnlist.t,v 1.1.1.1 1999/06/13 12:59:35 joe Exp $
|
|
||||||
#
|
|
||||||
# This test creates a database and drops it. Should be executed
|
# This test creates a database and drops it. Should be executed
|
||||||
# after listdsn.
|
# after listdsn.
|
||||||
#
|
|
||||||
|
|
||||||
use strict;
|
use strict;
|
||||||
|
BEGIN {
|
||||||
|
$| = 1;
|
||||||
|
$^W = 1;
|
||||||
|
}
|
||||||
|
|
||||||
use vars qw($test_dsn $test_user $test_password $mdriver $state);
|
use vars qw($test_dsn $test_user $test_password $mdriver $state);
|
||||||
|
|
||||||
#
|
#
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
#!/usr/local/bin/perl
|
#!/usr/bin/perl
|
||||||
#
|
|
||||||
# $Id: 40blobs.t,v 1.5 2004/07/21 20:50:45 matt Exp $
|
|
||||||
#
|
|
||||||
# This is a test for correct handling of the "unicode" database
|
# This is a test for correct handling of the "unicode" database
|
||||||
# handle parameter.
|
# handle parameter.
|
||||||
#
|
|
||||||
|
|
||||||
$^W = 1;
|
|
||||||
use strict;
|
use strict;
|
||||||
|
BEGIN {
|
||||||
|
$| = 1;
|
||||||
|
$^W = 1;
|
||||||
|
}
|
||||||
|
|
||||||
#
|
#
|
||||||
# Include std stuff
|
# Include std stuff
|
||||||
|
|
|
@ -1,3 +1,11 @@
|
||||||
|
#!/usr/bin/perl
|
||||||
|
|
||||||
|
use strict;
|
||||||
|
BEGIN {
|
||||||
|
$| = 1;
|
||||||
|
$^W = 1;
|
||||||
|
}
|
||||||
|
|
||||||
BEGIN {
|
BEGIN {
|
||||||
local $@;
|
local $@;
|
||||||
unless (eval { require Test::More; require Encode; 1 }) {
|
unless (eval { require Test::More; require Encode; 1 }) {
|
||||||
|
@ -6,7 +14,6 @@ BEGIN {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
use strict;
|
|
||||||
use Test::More tests => 8;
|
use Test::More tests => 8;
|
||||||
use DBI;
|
use DBI;
|
||||||
use Encode qw/decode/;
|
use Encode qw/decode/;
|
||||||
|
|
|
@ -1,6 +1,12 @@
|
||||||
|
#!/usr/bin/perl
|
||||||
|
|
||||||
use strict;
|
use strict;
|
||||||
use Test::More;
|
BEGIN {
|
||||||
BEGIN { plan tests => 3; }
|
$| = 1;
|
||||||
|
$^W = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
use Test::More tests => 3;
|
||||||
use DBI;
|
use DBI;
|
||||||
|
|
||||||
my $N_OPCODES = 50; # how many opcodes before calling the progress handler
|
my $N_OPCODES = 50; # how many opcodes before calling the progress handler
|
||||||
|
|
|
@ -1,12 +1,14 @@
|
||||||
#!/usr/local/bin/perl
|
#!/usr/bin/perl
|
||||||
#
|
|
||||||
# $Id: 20createdrop.t,v 1.1.1.1 1999/06/13 12:59:35 joe Exp $
|
|
||||||
#
|
|
||||||
# This is a skeleton test. For writing new tests, take this file
|
# This is a skeleton test. For writing new tests, take this file
|
||||||
# and modify/extend it.
|
# and modify/extend it.
|
||||||
#
|
|
||||||
|
|
||||||
use strict;
|
use strict;
|
||||||
|
BEGIN {
|
||||||
|
$| = 1;
|
||||||
|
$^W = 1;
|
||||||
|
}
|
||||||
|
|
||||||
use vars qw($test_dsn $test_user $test_password $mdriver $dbdriver);
|
use vars qw($test_dsn $test_user $test_password $mdriver $dbdriver);
|
||||||
$DBI::errstr = ''; # Make -w happy
|
$DBI::errstr = ''; # Make -w happy
|
||||||
require DBI;
|
require DBI;
|
||||||
|
|
|
@ -1,13 +1,14 @@
|
||||||
#!/usr/local/bin/perl
|
#!/usr/bin/perl
|
||||||
#
|
|
||||||
# $Id: 30insertfetch.t,v 1.1 2002/02/19 17:19:57 matt Exp $
|
|
||||||
#
|
|
||||||
# This is a simple insert/fetch test.
|
# This is a simple insert/fetch test.
|
||||||
#
|
|
||||||
|
|
||||||
use strict;
|
use strict;
|
||||||
|
BEGIN {
|
||||||
|
$| = 1;
|
||||||
|
$^W = 1;
|
||||||
|
}
|
||||||
|
|
||||||
use vars qw($test_dsn $test_user $test_password $mdriver $state);
|
use vars qw($test_dsn $test_user $test_password $mdriver $state);
|
||||||
$^W = 1;
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Make -w happy
|
# Make -w happy
|
||||||
|
|
|
@ -1,14 +1,12 @@
|
||||||
#!/usr/local/bin/perl
|
#!/usr/bin/perl
|
||||||
#
|
|
||||||
# $Id: 40bindparam.t,v 1.5 2002/12/29 16:24:55 matt Exp $
|
|
||||||
#
|
|
||||||
# This is a skeleton test. For writing new tests, take this file
|
|
||||||
# and modify/extend it.
|
|
||||||
#
|
|
||||||
|
|
||||||
use strict;
|
use strict;
|
||||||
|
BEGIN {
|
||||||
|
$| = 1;
|
||||||
|
$^W = 1;
|
||||||
|
}
|
||||||
|
|
||||||
use vars qw($test_dsn $test_user $test_password $mdriver $state);
|
use vars qw($test_dsn $test_user $test_password $mdriver $state);
|
||||||
$^W = 1;
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Make -w happy
|
# Make -w happy
|
||||||
|
|
14
t/40blobs.t
14
t/40blobs.t
|
@ -1,15 +1,15 @@
|
||||||
#!/usr/local/bin/perl
|
#!/usr/bin/perl
|
||||||
#
|
|
||||||
# $Id: 40blobs.t,v 1.4 2003/07/31 14:09:16 matt Exp $
|
|
||||||
#
|
|
||||||
# This is a test for correct handling of BLOBS; namely $dbh->quote
|
# This is a test for correct handling of BLOBS; namely $dbh->quote
|
||||||
# is expected to work correctly.
|
# is expected to work correctly.
|
||||||
#
|
|
||||||
|
|
||||||
use strict;
|
use strict;
|
||||||
use vars qw($test_dsn $test_user $test_password $mdriver $dbdriver $state);
|
BEGIN {
|
||||||
$^W = 1;
|
$| = 1;
|
||||||
|
$^W = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
use vars qw($test_dsn $test_user $test_password $mdriver $dbdriver $state);
|
||||||
|
|
||||||
#
|
#
|
||||||
# Make -w happy
|
# Make -w happy
|
||||||
|
|
|
@ -1,8 +1,12 @@
|
||||||
#!/usr/bin/perl -w
|
#!/usr/bin/perl
|
||||||
|
|
||||||
use strict;
|
use strict;
|
||||||
use Test::More;
|
BEGIN {
|
||||||
BEGIN { plan tests => 26 }
|
$| = 1;
|
||||||
|
$^W = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
use Test::More tests => 26;
|
||||||
use DBI;
|
use DBI;
|
||||||
|
|
||||||
unlink('foo', 'foo-journal');
|
unlink('foo', 'foo-journal');
|
||||||
|
|
|
@ -1,11 +1,13 @@
|
||||||
#!/usr/local/bin/perl
|
#!/usr/bin/perl
|
||||||
#
|
|
||||||
# $Id: 40listfields.t,v 1.1.1.1 1999/06/13 12:59:35 joe Exp $
|
|
||||||
#
|
|
||||||
# This is a test for statement attributes being present appropriately.
|
# This is a test for statement attributes being present appropriately.
|
||||||
#
|
|
||||||
|
|
||||||
use strict;
|
use strict;
|
||||||
|
BEGIN {
|
||||||
|
$| = 1;
|
||||||
|
$^W = 1;
|
||||||
|
}
|
||||||
|
|
||||||
use vars qw($test_dsn $test_user $test_password $mdriver $dbdriver $state $COL_KEY $COL_NULLABLE);
|
use vars qw($test_dsn $test_user $test_password $mdriver $dbdriver $state $COL_KEY $COL_NULLABLE);
|
||||||
|
|
||||||
#
|
#
|
||||||
|
|
13
t/40nulls.t
13
t/40nulls.t
|
@ -1,9 +1,12 @@
|
||||||
#!/usr/local/bin/perl
|
#!/usr/bin/perl
|
||||||
#
|
|
||||||
# $Id: 40nulls.t,v 1.1.1.1 1999/06/13 12:59:35 joe Exp $
|
|
||||||
#
|
|
||||||
# This is a test for correctly handling NULL values.
|
# This is a test for correctly handling NULL values.
|
||||||
#
|
|
||||||
|
use strict;
|
||||||
|
BEGIN {
|
||||||
|
$| = 1;
|
||||||
|
$^W = 1;
|
||||||
|
}
|
||||||
|
|
||||||
use strict;
|
use strict;
|
||||||
use vars qw($test_dsn $test_user $test_password $mdriver $dbdriver $state);
|
use vars qw($test_dsn $test_user $test_password $mdriver $dbdriver $state);
|
||||||
|
|
|
@ -1,17 +1,15 @@
|
||||||
#!/usr/local/bin/perl
|
#!/usr/bin/perl
|
||||||
#
|
|
||||||
# $Id: 40numrows.t,v 1.1 2002/02/19 17:19:57 matt Exp $
|
|
||||||
#
|
|
||||||
# This tests, whether the number of rows can be retrieved.
|
# This tests, whether the number of rows can be retrieved.
|
||||||
#
|
|
||||||
|
|
||||||
use strict;
|
use strict;
|
||||||
|
BEGIN {
|
||||||
|
$| = 1;
|
||||||
|
$^W = 1;
|
||||||
|
}
|
||||||
|
|
||||||
use vars qw($test_dsn $test_user $test_password $mdriver $state);
|
use vars qw($test_dsn $test_user $test_password $mdriver $state);
|
||||||
|
|
||||||
$^W = 1;
|
|
||||||
$| = 1;
|
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Make -w happy
|
# Make -w happy
|
||||||
#
|
#
|
||||||
|
|
|
@ -1,18 +1,17 @@
|
||||||
#!/usr/local/bin/perl
|
#!/usr/bin/perl
|
||||||
#
|
|
||||||
# $Id: 40numrows.t,v 1.2 2003/08/11 21:51:14 matt Exp $
|
|
||||||
#
|
|
||||||
# This is a regression test for bug #15186:
|
# This is a regression test for bug #15186:
|
||||||
# http://rt.cpan.org/Public/Bug/Display.html?id=15186
|
# http://rt.cpan.org/Public/Bug/Display.html?id=15186
|
||||||
# About re-using statements with prepare_cached().
|
# About re-using statements with prepare_cached().
|
||||||
|
|
||||||
use strict;
|
use strict;
|
||||||
|
BEGIN {
|
||||||
|
$| = 1;
|
||||||
|
$^W = 1;
|
||||||
|
}
|
||||||
|
|
||||||
use vars qw($test_dsn $test_user $test_password $mdriver $state);
|
use vars qw($test_dsn $test_user $test_password $mdriver $state);
|
||||||
|
|
||||||
$^W = 1;
|
|
||||||
$| = 1;
|
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Make -w happy
|
# Make -w happy
|
||||||
#
|
#
|
||||||
|
|
|
@ -1,11 +1,12 @@
|
||||||
#!/usr/local/bin/perl
|
#!/usr/bin/perl
|
||||||
#
|
|
||||||
# $Id: 50chopblanks.t,v 1.1 2002/02/19 17:19:57 matt Exp $
|
# Check whether 'ChopBlanks' works.
|
||||||
#
|
|
||||||
# This driver should check whether 'ChopBlanks' works.
|
|
||||||
#
|
|
||||||
|
|
||||||
use strict;
|
use strict;
|
||||||
|
BEGIN {
|
||||||
|
$| = 1;
|
||||||
|
$^W = 1;
|
||||||
|
}
|
||||||
|
|
||||||
#
|
#
|
||||||
# Make -w happy
|
# Make -w happy
|
||||||
|
@ -21,7 +22,6 @@ $test_password = '';
|
||||||
# Include lib.pl
|
# Include lib.pl
|
||||||
#
|
#
|
||||||
use DBI;
|
use DBI;
|
||||||
use strict;
|
|
||||||
$mdriver = "";
|
$mdriver = "";
|
||||||
{
|
{
|
||||||
my $file;
|
my $file;
|
||||||
|
|
15
t/50commit.t
15
t/50commit.t
|
@ -1,16 +1,15 @@
|
||||||
#!/usr/local/bin/perl
|
#!/usr/bin/perl
|
||||||
#
|
|
||||||
# $Id: 50commit.t,v 1.1.1.1 1999/06/13 12:59:35 joe Exp $
|
|
||||||
#
|
|
||||||
# This is testing the transaction support.
|
# This is testing the transaction support.
|
||||||
#
|
|
||||||
|
|
||||||
use strict;
|
use strict;
|
||||||
|
BEGIN {
|
||||||
|
$| = 1;
|
||||||
|
$^W = 1;
|
||||||
|
}
|
||||||
|
|
||||||
use vars qw($test_dsn $test_user $test_password $mdriver $state);
|
use vars qw($test_dsn $test_user $test_password $mdriver $state);
|
||||||
|
|
||||||
$^W = 1;
|
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Include lib.pl
|
# Include lib.pl
|
||||||
#
|
#
|
||||||
|
|
|
@ -1,7 +1,14 @@
|
||||||
|
#!/usr/bin/perl
|
||||||
|
|
||||||
use strict;
|
use strict;
|
||||||
use Test::More;
|
BEGIN {
|
||||||
BEGIN { plan tests => 27 }
|
$| = 1;
|
||||||
|
$^W = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
use Test::More tests => 27;
|
||||||
use DBI;
|
use DBI;
|
||||||
|
|
||||||
my $dbh = DBI->connect("dbi:SQLite:dbname=foo", "", "", { });
|
my $dbh = DBI->connect("dbi:SQLite:dbname=foo", "", "", { });
|
||||||
ok($dbh);
|
ok($dbh);
|
||||||
$dbh->{PrintError} = 0;
|
$dbh->{PrintError} = 0;
|
||||||
|
|
|
@ -1,6 +1,11 @@
|
||||||
#!/usr/bin/perl -w
|
#!/usr/bin/perl
|
||||||
|
|
||||||
use strict;
|
use strict;
|
||||||
|
BEGIN {
|
||||||
|
$| = 1;
|
||||||
|
$^W = 1;
|
||||||
|
}
|
||||||
|
|
||||||
use vars qw($test_dsn $test_user $test_password $mdriver $dbdriver);
|
use vars qw($test_dsn $test_user $test_password $mdriver $dbdriver);
|
||||||
|
|
||||||
if ($^O eq 'MSWin32') {
|
if ($^O eq 'MSWin32') {
|
||||||
|
|
|
@ -1,7 +1,15 @@
|
||||||
|
#!/usr/bin/perl
|
||||||
|
|
||||||
use strict;
|
use strict;
|
||||||
|
BEGIN {
|
||||||
|
$| = 1;
|
||||||
|
$^W = 1;
|
||||||
|
}
|
||||||
|
|
||||||
use Test::More;
|
use Test::More;
|
||||||
use DBI;
|
|
||||||
use Fatal qw(open);
|
use Fatal qw(open);
|
||||||
|
use DBI;
|
||||||
|
|
||||||
my @c_files = <*.c>, <*.xs>;
|
my @c_files = <*.c>, <*.xs>;
|
||||||
plan tests => scalar(@c_files);
|
plan tests => scalar(@c_files);
|
||||||
|
|
||||||
|
|
16
t/ak-dbd.t
16
t/ak-dbd.t
|
@ -1,16 +1,10 @@
|
||||||
#!/usr/local/bin/perl
|
#!/usr/bin/perl
|
||||||
#
|
|
||||||
# $Id: ak-dbd.t,v 1.2 2002/02/19 18:51:01 matt Exp $
|
|
||||||
#
|
|
||||||
# This is a skeleton test. For writing new tests, take this file
|
|
||||||
# and modify/extend it.
|
|
||||||
#
|
|
||||||
|
|
||||||
use strict;
|
use strict;
|
||||||
|
BEGIN {
|
||||||
$^W = 1;
|
$| = 1;
|
||||||
$| = 1;
|
$^W = 1;
|
||||||
|
}
|
||||||
|
|
||||||
#
|
#
|
||||||
# Make -w happy
|
# Make -w happy
|
||||||
|
|
|
@ -1,22 +1,12 @@
|
||||||
#!/usr/bin/perl -w
|
#!/usr/bin/perl
|
||||||
BEGIN {
|
|
||||||
local $@;
|
|
||||||
unless (eval { require Test::More; 1 }) {
|
|
||||||
print "1..0 # Skip need Test::More\n";
|
|
||||||
exit;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
use strict;
|
use strict;
|
||||||
use Test::More tests => 7;
|
|
||||||
|
|
||||||
BEGIN {
|
BEGIN {
|
||||||
use_ok 'DBD::SQLite'
|
$| = 1;
|
||||||
or BAIL_OUT 'DBD::SQLite(::Amalgamation) failed to load. No sense in continuing.';
|
$^W = 1;
|
||||||
no warnings 'once';
|
}
|
||||||
#diag "Testing DBD::SQLite version '$DBD::SQLite::VERSION' on DBI '$DBI::VERSION'";
|
|
||||||
|
|
||||||
#*DBD::SQLite::db::column_info = \&DBD::SQLite::db::_sqlite_column_info;
|
use Test::More tests => 6;
|
||||||
};
|
|
||||||
use DBI;
|
use DBI;
|
||||||
|
|
||||||
my $dbh = DBI->connect('dbi:SQLite:dbname=:memory:',undef,undef,{RaiseError => 1});
|
my $dbh = DBI->connect('dbi:SQLite:dbname=:memory:',undef,undef,{RaiseError => 1});
|
||||||
|
|
Loading…
Add table
Reference in a new issue