Converted all relevant tests to use new_dbm instead of new_fh and all tests (except...
[dbsrgits/DBM-Deep.git] / t / 44_upgrade_db.t
index b42ca9e..2517623 100644 (file)
@@ -2,6 +2,8 @@ $|++;
 use strict;
 use Test::More;
 
+plan skip_all => "upgrade_db.pl doesn't actually do anything correct.";
+
 # Add skips here
 BEGIN {
     plan skip_all => "Skipping the upgrade_db.pl tests on Win32/cygwin for now."
@@ -11,9 +13,9 @@ BEGIN {
         if ( $^O =~ /bsd/i );
 
     my @failures;
-    eval { use Pod::Usage 1.3; }; push @failures, 'Pod::Usage' if $@;
-    eval { use IO::Scalar; }; push @failures, 'IO::Scalar' if $@;
-    eval { use FileHandle::Fmode; }; push @failures, 'FileHandle::Fmode' if $@;
+    eval "use Pod::Usage 1.3;"; push @failures, 'Pod::Usage' if $@;
+    eval "use IO::Scalar;"; push @failures, 'IO::Scalar' if $@;
+    eval "use FileHandle::Fmode;"; push @failures, 'FileHandle::Fmode' if $@;
     if ( @failures ) {
         my $missing = join ',', @failures;
         plan skip_all => "'$missing' must be installed to run these tests";
@@ -87,6 +89,7 @@ foreach my $input_filename (
 
     foreach my $v ( @output_versions ) {
         my (undef, $output_filename) = new_fh();
+
         my $output = run_prog(
             $PROG,
             "-input $input_filename",
@@ -125,12 +128,12 @@ foreach my $input_filename (
 
         # Now, read the output file with the right version.
         ok( !$output, "A successful run produces no output" );
-        die "$output\n" if $output;
+        die "'$input_filename' -> '$v' : $output\n" if $output;
 
         my $db;
         if ( $v =~ /^1\.001[0-4]/ || $v =~ /^1\.000[3-9]/ ) {
             push @INC, 'lib';
-            eval "use DBM::Deep";
+            eval "use DBM::Deep $v"; die $@ if $@;
             $db = DBM::Deep->new( $output_filename );
         }
         elsif ( $v =~ /^1\.000?[0-2]?/ ) {