Mercurial > hg > monetdb-perl
view DBD/t/06ti.t @ 4:a0ec9e080a5b
Updated copyright.
author | Sjoerd Mullender <sjoerd@acm.org> |
---|---|
date | Fri, 06 Jan 2017 13:15:42 +0100 (2017-01-06) |
parents | cedccb7e0143 |
children | 8c8bd15f7a0b |
line wrap: on
line source
#!perl -I./t # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. # # Copyright 1997 - July 2008 CWI, August 2008 - 2017 MonetDB B.V. $| = 1; use strict; use warnings; use DBI (); use Test::More; if (defined $ENV{DBI_DSN}) { plan tests => 5; } else { plan skip_all => 'Cannot test without DB info'; } my $dbh = DBI->connect or die "Connect failed: $DBI::errstr\n"; ok ( defined $dbh,'Connection'); my @ti = $dbh->type_info; ok( @ti,'type_info'); for my $ti ( @ti ) { print "#\n"; printf "# %-20s => %s\n", $_, DBI::neat( $ti->{$_} ) for sort keys %$ti; } my $tia = $dbh->type_info_all; is( ref $tia,'ARRAY','type_info_all'); my $idx = shift @$tia; is( ref $idx,'HASH','index hash'); print '# ', DBI::neat_list( $_ ), "\n" for @$tia; ok( $dbh->disconnect,'Disconnect');