Subject: | main.t - "type_info" fails when run on MS SQL |
The "type_info" test verifies that sp_datatype_info() returns (strictly) more than 1 type with DATA_TYPE = 1. However, on (my) SQL Server, it returns exactly one such type: CHAR.
Unless this is an important test for Sybase environments (where perhaps there are more CHAR-like types, DATA_TYPE = 1), I propose to test that there is *at least* one such type. That should hold for any reasonable database.
Sam
--- t\main#4.t 2014-02-14 11:49:17.000000000 +-0100
+++ t\main.t 2014-02-14 12:13:22.000000000 +-0100
@@ -142,13 +142,13 @@
ok($value > 0, 'last insert id');
}
#my $ti = $dbh->type_info_all;
#foreach
my @type_info = $dbh->type_info(DBI::SQL_CHAR);
-ok(@type_info > 1, 'type_info');
+ok(@type_info >= 1, 'type_info');
ok(exists($type_info[0]->{DATA_TYPE}), 'type_info DATA_TYPE');
SKIP: {
skip 'requires DBI 1.34', 3 unless $DBI::VERSION >= 1.34;
my $sth = $dbh->prepare("select * from master..sysprocesses");