Commit | Line | Data |
1673d79e |
1 | #!./perl |
304efdcb |
2 | |
3 | BEGIN { |
4 | if( $ENV{PERL_CORE} ) { |
5 | chdir 't' if -d 't'; |
6 | @INC = qw(../lib); |
7 | } |
8 | } |
9 | |
1673d79e |
10 | use FileCache; |
11 | use vars qw(@files); |
12 | BEGIN { |
42bff5bd |
13 | @files = qw(foo bar baz quux Foo_Bar); |
1673d79e |
14 | chdir 't' if -d 't'; |
15 | |
16 | #For tests within the perl distribution |
17 | @INC = '../lib' if -d '../lib'; |
18 | END; |
19 | } |
20 | END{ |
98a392ec |
21 | 1 while unlink @files; |
1673d79e |
22 | } |
23 | |
24 | |
25 | print "1..1\n"; |
26 | |
27 | {# Test 1: that we can open files |
28 | for my $path ( @files ){ |
29 | cacheout $path; |
30 | print $path "$path 1\n"; |
846e3505 |
31 | close $path; |
1673d79e |
32 | } |
33 | print "not " unless scalar map({ -f } @files) == scalar @files; |
34 | print "ok 1\n"; |
35 | } |