Author: jkeenan
Date: Tue Dec  9 19:33:40 2008
New Revision: 33739

Modified:
   branches/testparrottest/t/perl/Parrot_Test.t

Log:
Begin developing tests for $ENV{POSTMORTEM}.

Modified: branches/testparrottest/t/perl/Parrot_Test.t
==============================================================================
--- branches/testparrottest/t/perl/Parrot_Test.t        (original)
+++ branches/testparrottest/t/perl/Parrot_Test.t        Tue Dec  9 19:33:40 2008
@@ -19,6 +19,9 @@
 use strict;
 use warnings;
 use Test::More;
+#use Test::More qw( no_plan );;
+use Carp;
+use Data::Dumper;$Data::Dumper::Indent=1;
 use File::Spec;
 use lib qw( lib );
 use Parrot::Config;
@@ -124,6 +127,7 @@
 OUTPUT
 test_test($desc);
 
+
 $desc = 'pasm_output_isnt: success';
 test_out("ok 1 - $desc");
 pasm_output_isnt( <<'CODE', <<"OUTPUT", $desc );
@@ -627,6 +631,20 @@
 test_test($desc);
 }
 
+# Cleanup t/perl/
+
+unless ( $ENV{POSTMORTEM} ) {
+    my $tdir = q{t/perl};
+    opendir my $DIRH, $tdir or croak "Unable to open $tdir for reading: $!";
+    my @need_cleanup =
+        grep { m/Parrot_Test_\d+\.(?:pir|pasm|out|c|o|build)$/ }
+        readdir $DIRH;
+    closedir $DIRH or croak "Unable to close $tdir after reading: $!";
+    for my $f (@need_cleanup) {
+        unlink qq{$tdir/$f} or croak "Unable to remove $f: $!";
+    }
+}
+
 # Local Variables:
 #   mode: cperl
 #   cperl-indent-level: 4

Reply via email to