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
|
#!perl
use strict;
use warnings;
# Base DBD Driver Test
use Test::More tests => 6;
require_ok('DBI');
eval {
DBI->import
};
is( $@ => '', 'successfully import DBI' );
is( ref DBI->internal => 'DBI::dr', 'internal' );
my $drh = eval {
# This is a special case. install_driver should not normally be used.
DBI->install_driver('Oracle');
};
is( $@ => '', q|install_driver('Oracle') doesnt fail| )
or diag "Failed to load Oracle extension and/or shared libraries";
SKIP: {
skip 'install_driver failed - skipping remaining', 2 if $@;
is( ref $drh => 'DBI::dr', 'install_driver(Oracle) returns the correct object' )
or diag '$drh wrong object type, found: ' . ref $drh;
ok( do { $drh && $drh->{Version} }, 'version found in $drh object');
}
|