BEGIN {
chdir 't' if -d 't';
- unshift @INC, '../lib';
+ @INC = '../lib';
+ require Config; import Config;
+ if (($Config{'extensions'} !~ /\b(DB|[A-Z]DBM)_File\b/) ){
+ print "1..0 # Skipping (no DB_File or [A-Z]DBM_File)\n";
+ exit 0;
+ }
}
require AnyDBM_File;
-#If Fcntl is not available, try 0x202 or 0x102 for O_RDWR|O_CREAT
use Fcntl;
print "1..12\n";
$Is_Dosish = ($^O eq 'amigaos' || $^O eq 'MSWin32' or $^O eq 'dos' or
- $^O eq 'os2' or $^O eq 'mint' or $^O =~ /cygwin/);
+ $^O eq 'os2' or $^O eq 'mint');
unlink <Op_dbmx*>;
print "ok 12\n" ;
}
else {
- print "not ok 12\n" ;
if ($AnyDBM_File::ISA[0] eq 'DB_File' && $DB_File::db_ver >= 2.004010) {
($major, $minor, $patch) = ($DB_File::db_ver =~ /^(\d+)\.(\d\d\d)(\d\d\d)/) ;
$major =~ s/^0+// ;
$minor =~ s/^0+// ;
$patch =~ s/^0+// ;
$compact = "$major.$minor.$patch" ;
-
- print STDERR <<EOM ;
-#
-# anydbm.t test 12 will fail when AnyDBM_File uses the combination of
-# DB_File and Berkeley DB 2.4.10 (or greater).
-# You are using DB_File $DB_File::VERSION and Berkeley DB $compact
-#
-# Berkeley DB 2 from version 2.4.10 onwards does not allow null keys.
-# This feature will be reenabled in a future version of Berkeley DB.
-#
-EOM
+ #
+ # anydbm.t test 12 will fail when AnyDBM_File uses the combination of
+ # DB_File and Berkeley DB 2.4.10 (or greater).
+ # You are using DB_File $DB_File::VERSION and Berkeley DB $compact
+ #
+ # Berkeley DB 2 from version 2.4.10 onwards does not allow null keys.
+ # This feature will be reenabled in a future version of Berkeley DB.
+ #
+ print "ok 12 # skipped: db v$compact, no null key support\n" ;
+ }
+ else {
+ print "not ok 12\n" ;
}
}