Debian Codegraph @

t/10_base.t

raw
1 #!/usr/bin/perl
2
3 # Test whether the driver can be installed
4
5 use strict;
6 use warnings;
7 use Test::More;
8
9 BEGIN {
10 use_ok ("DBI");
11 use_ok ("SQL::Statement");
12 }
13
14 ok ($SQL::Statement::VERSION, "SQL::Statement::Version $SQL::Statement::VERSION");
15
16 do "./t/lib.pl";
17
18 my $nano = $ENV{DBI_SQL_NANO};
19 defined $nano or $nano = "not set";
20 diag ("Showing relevant versions (DBI_SQL_NANO = $nano)");
21 diag ("Using DBI version $DBI::VERSION");
22 diag ("Using DBD::File version $DBD::File::VERSION");
23 diag ("Using SQL::Statement version $SQL::Statement::VERSION");
24 diag ("Using Text::CSV_XS version $Text::CSV_XS::VERSION");
25
26 ok (my $switch = DBI->internal, "DBI->internal");
27 is (ref $switch, "DBI::dr", "Driver class");
28
29 # This is a special case. install_driver should not normally be used.
30 ok (my $drh = DBI->install_driver ("CSV"), "Install driver");
31
32 is (ref $drh, "DBI::dr", "Driver class installed");
33
34 ok ($drh->{Version}, "Driver version $drh->{Version}");
35
36 my $dbh = DBI->connect ("dbi:CSV:");
37 my $csv_version_info = $dbh->csv_versions ();
38 ok ($csv_version_info, "csv_versions");
39 diag ($csv_version_info);
40
41 done_testing ();