summaryrefslogtreecommitdiff
path: root/gnu/usr.bin/perl/cpan/IO-Compress/t/010examples-bzip2.t
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/usr.bin/perl/cpan/IO-Compress/t/010examples-bzip2.t')
-rwxr-xr-xgnu/usr.bin/perl/cpan/IO-Compress/t/010examples-bzip2.t17
1 files changed, 14 insertions, 3 deletions
diff --git a/gnu/usr.bin/perl/cpan/IO-Compress/t/010examples-bzip2.t b/gnu/usr.bin/perl/cpan/IO-Compress/t/010examples-bzip2.t
index 2248535f7d1..9bb5eb20e74 100755
--- a/gnu/usr.bin/perl/cpan/IO-Compress/t/010examples-bzip2.t
+++ b/gnu/usr.bin/perl/cpan/IO-Compress/t/010examples-bzip2.t
@@ -66,8 +66,12 @@ EOM
my @hello2 = grep(s/$/\n/, split(/\n/, $hello2)) ;
-my ($file1, $file2, $stderr) ;
-my $lex = new LexFile $file1, $file2, $stderr ;
+my $file1 = "hello1.gz" ;
+my $file2 = "hello2.gz" ;
+my $stderr = "err.out" ;
+
+for ($file1, $file2, $stderr) { 1 while unlink $_ } ;
+
bzip2 \$hello1 => $file1 ;
bzip2 \$hello2 => $file2 ;
@@ -77,7 +81,8 @@ sub check
my $command = shift ;
my $expected = shift ;
- my $lex = new LexFile my $stderr ;
+ my $stderr = 'err.out';
+ 1 while unlink $stderr;
my $cmd = "$command 2>$stderr";
my $stdout = `$cmd` ;
@@ -132,3 +137,9 @@ for ($file1, $file2, $stderr) { 1 while unlink $_ } ;
title "bzcat" ;
check "$Perl ${examples}/bzcat $file2", $hello1 ;
}
+
+END
+{
+ for ($file1, $file2, $stderr) { 1 while unlink $_ } ;
+}
+