Couple more skips/clarifications (not applicable to master)
[dbsrgits/DBIx-Class.git] / t / storage / debug.t
index e023fff..d62009a 100644 (file)
@@ -10,6 +10,10 @@ use lib qw(t/lib);
 use DBICTest;
 use Path::Class qw/file/;
 
+# something deep in Path::Class - mainline ditched it altogether
+plan skip_all => "Test is finicky under -T before 5.10"
+  if "$]" < 5.010 and ${^TAINT};
+
 BEGIN { delete @ENV{qw(DBIC_TRACE DBIC_TRACE_PROFILE DBICTEST_SQLITE_USE_FILE)} }
 
 my $schema = DBICTest->init_schema();
@@ -51,7 +55,7 @@ $schema->storage->debugfh(undef);
 }
 
 END {
-  unlink $lfn;
+  unlink $lfn if $lfn;
 }
 
 open(STDERRCOPY, '>&STDERR');
@@ -69,11 +73,12 @@ my $exception = try {
   open(STDERR, '>&STDERRCOPY');
 };
 
-like $exception, qr/
+ok $exception =~ /
   \QDuplication of STDERR for debug output failed (perhaps your STDERR is closed?)\E
     .+
   \Qat @{[__FILE__]} line $exception_line_number\E$
-/xms;
+/xms
+  or diag "Unexpected exception text:\n\n$exception\n";
 
 my @warnings;
 $exception = try {