Bumping version to 2.000006
[p5sagit/strictures.git] / t / extras.t
index 0423d40..8301bf4 100644 (file)
@@ -1,10 +1,13 @@
 BEGIN { delete $ENV{PERL_STRICTURES_EXTRA} }
 use strict;
 use warnings;
-use Test::More $] >= 5.008_004 ? qw(no_plan)
-  : (skip_all => 'Extra tests disabled on perls <= 5.008003');
+use Test::More 0.88;
+
+plan skip_all => 'Extra tests disabled on perls <= 5.008003' unless "$]" >= 5.008_004;
 
 use File::Temp;
+use File::Spec;
+use File::Path qw(mkpath rmtree);
 use Cwd 'cwd';
 
 my %extras;
@@ -29,7 +32,9 @@ my $cwd = cwd;
 for my $version ( 1, 2 ) {
 
   my $tempdir = File::Temp::tempdir('strictures-XXXXXX', CLEANUP => 1, TMPDIR => 1);
-  chdir $tempdir;
+  my $subtemp = File::Spec->catdir($tempdir, 'sub1', 'sub2');
+  mkpath $subtemp;
+  chdir $subtemp;
 
   local $strictures::Smells_Like_VCS = undef;
   eval qq{
@@ -54,7 +59,7 @@ use strictures $version;
   }
 
   chdir $cwd;
-  rmdir $tempdir;
+  rmtree $tempdir;
 
   local $strictures::Smells_Like_VCS = 1;
 
@@ -130,3 +135,5 @@ use strictures $version;
     }
   }
 }
+
+done_testing;