X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FFileCache.t;h=1d91d210ab8c2400fc17f154350c3cefe5cbe67c;hb=35c0985d87e203a100f5c5fc6518bee6a2e2fd9d;hp=9e28270f7a3d838196570f9ab1407d1931c091da;hpb=c14fc35a124901bb0a7c6981001dbcf00006611d;p=p5sagit%2Fp5-mst-13.2.git diff --git a/lib/FileCache.t b/lib/FileCache.t index 9e28270..1d91d21 100755 --- a/lib/FileCache.t +++ b/lib/FileCache.t @@ -24,11 +24,11 @@ my @files = qw(foo bar baz quux); 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" ; @@ -57,10 +57,11 @@ my @files = qw(foo bar baz quux); cacheout '<', "foo"; print "not " unless eq "foo 2\n"; print "ok 4\n"; + close(foo); } {# Test 5: that close is overridden properly - cacheout local $_ = "Foo::Bar"; + cacheout local $_ = "Foo_Bar"; print $_ "Hello World\n"; close($_); open($_, "+>$_"); @@ -68,13 +69,14 @@ my @files = qw(foo bar baz quux); seek($_, 0, 0); print "not " unless <$_> eq "$_\n"; print "ok 5\n"; + close($_); } q( {# Test close override package Bob; use FileCache; - cacheout local $_ = "Foo'Bar"; + cacheout local $_ = "Foo_Bar"; print $_ "Hello World\n"; close($_); open($_, "+>$_"); @@ -82,7 +84,8 @@ q( seek($_, 0, 0); print "not " unless <$_> eq "$_\n"; print "ok 5\n"; + close($_); } ); -unlink @files, "Foo'Bar"; +1 while unlink @files, "Foo_Bar";