3 use FileCache maxopen => 2;
5 BEGIN { @files = map { "max_$_" } qw(foo bar baz quux) }
6 END { 1 while unlink @files }
8 use Test::More tests => 5;
10 {# Test 2: that we actually adhere to maxopen
11 for my $path ( @files ){
13 print $path "$path 1\n";
17 for my $path ( @files ){
18 ok(fileno($path) || $path =~ /^max_(?:foo|bar)$/);
19 next unless fileno($path);
20 print $path "$path 2\n";
22 open($path, '<', $path);
27 ok( grep(/^max_(?:baz|quux) 2$/, @cat) == 2 );