/MANIFEST
/META.yml
/README
-t/_dump
-t/sqlite_test
-t/sqlite_test-journal
lib/DBIx/Class/Schema/Loader/Optional/Dependencies.pod
-
+t/var
use Test::More;
use lib qw(t/lib);
use dbixcsl_common_tests;
+use dbixcsl_test_dir qw/$tdir/;
eval { require DBD::SQLite };
my $class = $@ ? 'SQLite2' : 'SQLite';
my $tester = dbixcsl_common_tests->new(
vendor => 'SQLite',
auto_inc_pk => 'INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT',
- dsn => "dbi:$class:dbname=./t/sqlite_test",
+ dsn => "dbi:$class:dbname=$tdir/sqlite_test",
user => '',
password => '',
connect_info_opts => {
$tester->run_tests();
END {
- unlink './t/sqlite_test';
+ unlink "$tdir/sqlite_test";
}
DBICTest::Schema::_make_schema_at_explicit->clone;
},
'no_skip_load_external' => sub {
- # By default we should pull in t/lib/DBICTest/Schema/13/Foo.pm $skip_me since t/lib is in @INC
+ # By default we should pull in t/lib/DBICTest/Schema/_no_skip_load_external/Foo.pm $skip_me since t/lib is in @INC
use DBIx::Class::Schema::Loader;
DBIx::Class::Schema::Loader::make_schema_at(
'DBICTest::Schema::_no_skip_load_external',
DBICTest::Schema::_no_skip_load_external->clone;
},
'skip_load_external' => sub {
- # When we explicitly skip_load_external t/lib/DBICTest/Schema/14/Foo.pm should be ignored
+ # When we explicitly skip_load_external t/lib/DBICTest/Schema/_skip_load_external/Foo.pm should be ignored
use DBIx::Class::Schema::Loader;
DBIx::Class::Schema::Loader::make_schema_at(
'DBICTest::Schema::_skip_load_external',
use lib qw(t/lib);
use File::Path;
use make_dbictest_db;
+use dbixcsl_test_dir qw/$tdir/;
-my $dump_path = './t/_dump';
+my $dump_path = "$tdir/dump";
local $SIG{__WARN__} = sub {
warn $_[0] unless $_[0] =~
use Lingua::EN::Inflect::Number ();
use lib qw(t/lib);
use make_dbictest_db_with_unique;
+use dbixcsl_test_dir qw/$tdir/;
-my $DUMP_DIR = './t/_common_dump';
+my $DUMP_DIR = "$tdir/common_dump";
rmtree $DUMP_DIR;
my $SCHEMA_CLASS = 'DBIXCSL_Test::Schema';
use strict;
use lib qw(t/backcompat/0.04006/lib);
use dbixcsl_common_tests;
+use dbixcsl_test_dir qw/$tdir/;
+
use Test::More;
plan skip_all => 'set SCHEMA_LOADER_TESTS_BACKCOMPAT to enable these tests'
unless $ENV{SCHEMA_LOADER_TESTS_BACKCOMPAT};
my $tester = dbixcsl_common_tests->new(
vendor => 'SQLite',
auto_inc_pk => 'INTEGER NOT NULL PRIMARY KEY',
- dsn => "dbi:$class:dbname=./t/sqlite_test",
+ dsn => "dbi:$class:dbname=$tdir/sqlite_test",
user => '',
password => '',
);
}
END {
- unlink './t/sqlite_test' if $ENV{SCHEMA_LOADER_TESTS_BACKCOMPAT};
+ unlink "$tdir/sqlite_test" if $ENV{SCHEMA_LOADER_TESTS_BACKCOMPAT};
}
use lib qw(t/backcompat/0.04006/lib);
use File::Path;
use make_dbictest_db;
+use dbixcsl_test_dir qw/$tdir/;
plan skip_all => 'set SCHEMA_LOADER_TESTS_BACKCOMPAT to enable these tests'
unless $ENV{SCHEMA_LOADER_TESTS_BACKCOMPAT};
-my $dump_path = './t/_dump';
+my $dump_path = "$tdir/dump";
local $SIG{__WARN__} = sub {
warn @_ unless $_[0] =~
use lib qw(t/backcompat/0.04006/lib);
use File::Path;
use make_dbictest_db;
+use dbixcsl_test_dir qw/$tdir/;
+
require DBIx::Class::Schema::Loader;
plan skip_all => 'set SCHEMA_LOADER_TESTS_BACKCOMPAT to enable these tests'
unless $ENV{SCHEMA_LOADER_TESTS_BACKCOMPAT};
-my $DUMP_PATH = './t/_dump';
+my $DUMP_PATH = "$tdir/dump";
sub do_dump_test {
my %tdata = @_;
--- /dev/null
+package dbixcsl_test_dir;
+
+use warnings;
+use strict;
+
+our $tdir = 't/var';
+
+use base qw/Exporter/;
+our @EXPORT_OK = '$tdir';
+
+die "/t does not exist, this can't be right...\n"
+ unless -d 't';
+
+unless (-d $tdir) {
+ mkdir $tdir or die "Unable to create $tdir: $!\n";
+}
+
+1;
use strict;
use warnings;
use DBI;
+use dbixcsl_test_dir qw/$tdir/;
eval { require DBD::SQLite };
my $class = $@ ? 'SQLite2' : 'SQLite';
-my $fn = './t/dbictest.db';
+my $fn = "$tdir/dbictest.db";
unlink($fn);
our $dsn = "dbi:$class:dbname=$fn";
use DBIx::Class::Schema::Loader::Optional::Dependencies ();
use namespace::clean;
-my $DUMP_DIR = './t/_common_dump';
+use dbixcsl_test_dir qw/$tdir/;
+
+my $DUMP_DIR = "$tdir/common_dump";
rmtree $DUMP_DIR;
sub new {
find $find_cb, $DUMP_DIR;
# system "rm -f /tmp/before_rescan/* /tmp/after_rescan/*";
-# system "cp t/_common_dump/DBIXCSL_Test/Schema/*.pm /tmp/before_rescan";
+# system "cp $tdir/common_dump/DBIXCSL_Test/Schema/*.pm /tmp/before_rescan";
my $before_digest = $digest->b64digest;
use DBIx::Class::Schema::Loader::Utils 'dumper_squashed';
use DBIx::Class::Schema::Loader ();
-my $DUMP_PATH = 't/_dump';
+use dbixcsl_test_dir qw/$tdir/;
+
+my $DUMP_PATH = "$tdir/dump";
sub cleanup {
rmtree($DUMP_PATH, 1, 1);
}
--- /dev/null
+package dbixcsl_test_dir;
+
+use warnings;
+use strict;
+
+our $tdir = 't/var';
+
+use base qw/Exporter/;
+our @EXPORT_OK = '$tdir';
+
+die "/t does not exist, this can't be right...\n"
+ unless -d 't';
+
+unless (-d $tdir) {
+ mkdir $tdir or die "Unable to create $tdir: $!\n";
+}
+
+1;
use strict;
use warnings;
use DBI;
+use dbixcsl_test_dir qw/$tdir/;
eval { require DBD::SQLite };
my $class = $@ ? 'SQLite2' : 'SQLite';
-my $fn = './t/dbictest.db';
+my $fn = "$tdir/dbictest.db";
unlink($fn);
our $dsn = "dbi:$class:dbname=$fn";
use strict;
use warnings;
use DBI;
+use dbixcsl_test_dir qw/$tdir/;
eval { require DBD::SQLite };
my $class = $@ ? 'SQLite2' : 'SQLite';
-my $fn = './t/dbictest_clashing_tables.db';
+my $fn = "$tdir/dbictest_clashing_tables.db";
unlink($fn);
our $dsn = "dbi:$class:dbname=$fn";
use strict;
use warnings;
use DBI;
+use dbixcsl_test_dir qw/$tdir/;
+
eval { require DBD::SQLite };
my $class = $@ ? 'SQLite2' : 'SQLite';
-my $fn = './t/dbictest_with_unique.db';
+my $fn = "$tdir/dbictest_with_unique.db";
unlink($fn);
our $dsn = "dbi:$class:dbname=$fn";