my @cat;
for my $path ( @files ){
print $path "$path 2\n";
- close($path);
+ close($path);
open($path, $path);
<$path>;
push @cat, <$path>;
- close($path);
+ close($path);
}
print "not " if (grep {/foo|bar/} @cat) && ! (grep {/baz|quux/} @cat);
print "ok 2\n" ;
cacheout '<', "foo";
print "not " unless <foo> eq "foo 2\n";
print "ok 4\n";
+ close(foo);
}
{# Test 5: that close is overridden properly
seek($_, 0, 0);
print "not " unless <$_> eq "$_\n";
print "ok 5\n";
+ close($_);
}
q(
seek($_, 0, 0);
print "not " unless <$_> eq "$_\n";
print "ok 5\n";
+ close($_);
}
);
ok($cksum1 == $cksum2, "CR vs LF");
ok($cksum1 == $cksum3, "CR vs CRLF");
ok($cksum2 == $cksum3, "LF vs CRLF");
+close IN;
END {
- 1 while unlink("$$.pod", "$$.in", "$$.o1", "$$.o2", "$$.o3");
+ 1 while unlink("$$.pod", "$$.in", "$$.o1", "$$.o2", "$$.o3",
+ "pod2htmd.x~~", "pod2htmi.x~~");
}
open(F, ">:-aa", "bb");
use warnings 'layer';
open(F, ">:-aa", "bb");
+close F;
EXPECT
perlio: invalid separator character '-' in layer specification list -aa at - line 6.
########
open(F, ">:aa(", "bb");
use warnings 'layer';
open(F, ">:aa(", "bb");
+close F;
EXPECT
perlio: argument list not closed for layer "aa(" at - line 6.
########
open(F, ">:xyz", "bb");
use warnings 'layer';
open(F, ">:xyz", "bb");
+close F;
END { 1 while unlink "bb" } # KEEP THIS WITH THE LAST TEST.
EXPECT
perlio: unknown layer "xyz".
# build the executable
chdir($testdir);
END {
-# chdir($cwd);
-# rmtree($testdir);
+ chdir($cwd) && rmtree("$cwd/$testdir") if -d "$cwd/$testdir";
}
if (open(my $EIN, "$cwd/op/${exename}_exe.uu")) {
print "# Unpacking $exename.exe\n";