2 use FileCache maxopen=>2;
6 @files = qw(foo bar baz quux);
9 #For tests within the perl distribution
10 @INC = '../lib' if -d '../lib';
15 1 while unlink @files;
18 {# Test 2: that we actually adhere to maxopen
19 for my $path ( @files ){
21 print $path "$path 1\n";
25 for my $path ( @files ){
26 ok(fileno($path) || $path =~ /^(?:foo|bar)$/);
27 next unless fileno($path);
28 print $path "$path 2\n";
35 ok( grep(/^(?:baz|quux) 2$/, @cat) == 2 );