File: 90bug_58_mro.t

package info (click to toggle)
libdbix-class-schema-loader-perl 0.07053-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,464 kB
  • sloc: perl: 11,520; sh: 544; makefile: 4
file content (39 lines) | stat: -rw-r--r-- 922 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
use strict;
use warnings;
use Test::More;
use Test::Exception;
use DBIx::Class::Schema::Loader;

# use this if you keep a copy of DBD::Sybase linked to FreeTDS somewhere else
BEGIN {
    if (my $lib_dirs = $ENV{DBICTEST_MSSQL_PERL5LIB}) {
        unshift @INC, $_ for split /:/, $lib_dirs;
    }
}

my ($dsn, $user, $pass);

for (qw/MSSQL_ODBC MSSQL_ADO MSSQL/) {
    next unless $ENV{"DBICTEST_${_}_DSN"};

    $dsn  = $ENV{"DBICTEST_${_}_DSN"};
    $user = $ENV{"DBICTEST_${_}_USER"};
    $pass = $ENV{"DBICTEST_${_}_PASS"};

    last;
}

plan skip_all => 'perl 5.8 required for this test'
    if $] >= 5.009005;

plan ($dsn ? (tests => 1) : (skip_all => 'MSSQL required for this test'));

lives_ok {
    DBIx::Class::Schema::Loader::make_schema_at(
        'DBICTest::Schema',
        { naming => 'current' },
        [ $dsn, $user, $pass ],
    );
} 'dynamic MSSQL schema created using make_schema_at';

done_testing;