File: 10connect.t

package info (click to toggle)
libdbd-mysql-perl 4.007-1%2Blenny1
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 684 kB
  • ctags: 330
  • sloc: ansic: 3,678; perl: 2,978; makefile: 54
file content (26 lines) | stat: -rwxr-xr-x 526 bytes parent folder | download | duplicates (3)
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
#!perl -w
# vim: ft=perl

use Test::More ;
use DBI;
use DBI::Const::GetInfoType;
use strict;
use vars qw($mdriver);
$|= 1;

use vars qw($test_dsn $test_user $test_password);
use lib 't', '.';
require 'lib.pl';

my $dbh;
eval {$dbh= DBI->connect($test_dsn, $test_user, $test_password,
                      { RaiseError => 1, PrintError => 1, AutoCommit => 0 });};

if ($@) {
    plan skip_all => "ERROR: $DBI::errstr Can't continue test";
}
plan tests => 2; 

ok defined $dbh, "Connected to database";

ok $dbh->disconnect();