Restructure handling of the test scratch-dir, move all activity
[dbsrgits/DBIx-Class-Schema-Loader.git] / t / backcompat / 0.04006 / 10sqlite_common.t
CommitLineData
9a95164d 1use strict;
3c10a10f 2use lib qw(t/backcompat/0.04006/lib);
9a95164d 3use dbixcsl_common_tests;
c213fd3d 4use dbixcsl_test_dir qw/$tdir/;
5
1c94fb11 6use Test::More;
fb3bb595 7plan skip_all => 'set SCHEMA_LOADER_TESTS_BACKCOMPAT to enable these tests'
1c94fb11 8 unless $ENV{SCHEMA_LOADER_TESTS_BACKCOMPAT};
9a95164d 9
10eval { require DBD::SQLite };
11my $class = $@ ? 'SQLite2' : 'SQLite';
12
13{
14 my $tester = dbixcsl_common_tests->new(
15 vendor => 'SQLite',
16 auto_inc_pk => 'INTEGER NOT NULL PRIMARY KEY',
c213fd3d 17 dsn => "dbi:$class:dbname=$tdir/sqlite_test",
9a95164d 18 user => '',
19 password => '',
20 );
21
22 $tester->run_tests();
23}
24
25END {
c213fd3d 26 unlink "$tdir/sqlite_test" if $ENV{SCHEMA_LOADER_TESTS_BACKCOMPAT};
9a95164d 27}