Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

remove unportable system(rm

  • Loading branch information...
commit ece2d635e9ab37330538036f1cccc1e588f826c4 1 parent 9161327
@bobtfish authored
Showing with 4 additions and 8 deletions.
  1. +4 −8 t/12-fail.t
View
12 t/12-fail.t
@@ -17,7 +17,6 @@ $inc = "-I $inc" if $inc;
my $content = <$fh>;
like( $content, qr/^not ok 1 - No windows line endings in '[^']*' on line 4/m, 'windows EOL found in tmp file 1' );
unlink $outfile;
- system("rm -rf $dir");
}
{
my $dir = make_bad_file_2();
@@ -28,7 +27,6 @@ $inc = "-I $inc" if $inc;
my $content = <$fh>;
like( $content, qr/^not ok 1 - No windows line endings in '[^']*' on line \d+/m, 'windows EOL found in tmp file2 ' );
unlink $outfile;
- system("rm -rf $dir");
}
{
my ($dir, $file) = make_bad_file_3();
@@ -39,7 +37,6 @@ $inc = "-I $inc" if $inc;
my $content = <$fh>;
like( $content, qr/^not ok 1 - No windows line endings in '[^']*' on line \d+/m, 'windows EOL found in tmp file 3' );
unlink $outfile;
- system("rm -rf $dir");
}
{
@@ -51,11 +48,10 @@ $inc = "-I $inc" if $inc;
my $content = <$fh>;
like( $content, qr/^not ok 1 - No windows line endings in '[^']*' on line \d+/m, 'windows EOL found in tmp file 4' );
unlink $outfile;
- system("rm -rf $dir");
}
sub make_bad_file_1 {
- my $tmpdir = tempdir();
+ my $tmpdir = tempdir( CLEANUP => 1 );
my ($fh, $filename) = tempfile( DIR => $tmpdir, SUFFIX => '.pL' );
print $fh <<"DUMMY";
#!perl
@@ -68,7 +64,7 @@ DUMMY
}
sub make_bad_file_2 {
- my $tmpdir = tempdir();
+ my $tmpdir = tempdir( CLEANUP => 1 );
my ($fh, $filename) = tempfile( DIR => $tmpdir, SUFFIX => '.pL' );
print $fh <<"DUMMY";
#!perl
@@ -89,7 +85,7 @@ DUMMY
=cut
sub main {
- print "Hello!\n";
+ print "Hello!\n";
}
DUMMY
return $tmpdir;
@@ -110,7 +106,7 @@ DUMMY
}
-
+
1;
Please sign in to comment.
Something went wrong with that request. Please try again.