| Line | |
|---|
| 1 | #!./perl
|
|---|
| 2 | use FileCache;
|
|---|
| 3 | use vars qw(@files);
|
|---|
| 4 | BEGIN {
|
|---|
| 5 | @files = qw(foo bar baz quux Foo_Bar);
|
|---|
| 6 | chdir 't' if -d 't';
|
|---|
| 7 |
|
|---|
| 8 | #For tests within the perl distribution
|
|---|
| 9 | @INC = '../lib' if -d '../lib';
|
|---|
| 10 | END;
|
|---|
| 11 | }
|
|---|
| 12 | END{
|
|---|
| 13 | 1 while unlink @files;
|
|---|
| 14 | }
|
|---|
| 15 |
|
|---|
| 16 |
|
|---|
| 17 | print "1..1\n";
|
|---|
| 18 |
|
|---|
| 19 | {# Test 1: that we can open files
|
|---|
| 20 | for my $path ( @files ){
|
|---|
| 21 | cacheout $path;
|
|---|
| 22 | print $path "$path 1\n";
|
|---|
| 23 | close $path;
|
|---|
| 24 | }
|
|---|
| 25 | print "not " unless scalar map({ -f } @files) == scalar @files;
|
|---|
| 26 | print "ok 1\n";
|
|---|
| 27 | }
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.