3 use FileCache maxopen => 2;
5 BEGIN { @files = qw(foo bar baz quux Foo_Bar) }
6 END { 1 while unlink @files }
8 use Test::More tests => 2;
10 {# Test 3: that we open for append on second viewing
12 for my $path ( @files ){
14 print $path "$path 3\n";
16 for my $path ( @files ){
18 print $path "$path 33\n";
20 for my $path ( @files ){
21 open($path, '<', $path);
22 push @cat, do{ local $/; <$path>};
26 ok(scalar(grep/\b3$/m, @cat) == scalar(@files));
29 for my $path ( @files ){
31 print $path "$path 333\n";
33 for my $path ( @files ){
34 open($path, '<', $path);
35 push @cat, do{ local $/; <$path>};
38 ok(scalar(grep /\b33$/m, @cat) == scalar(@files));