xref: /onnv-gate/usr/src/cmd/perl/5.8.4/distrib/lib/FileCache/t/01open.t (revision 0:68f95e015346)
1*0Sstevel@tonic-gate#!./perl
2*0Sstevel@tonic-gateuse FileCache;
3*0Sstevel@tonic-gateuse vars qw(@files);
4*0Sstevel@tonic-gateBEGIN {
5*0Sstevel@tonic-gate    @files = qw(foo bar baz quux Foo_Bar);
6*0Sstevel@tonic-gate    chdir 't' if -d 't';
7*0Sstevel@tonic-gate
8*0Sstevel@tonic-gate    #For tests within the perl distribution
9*0Sstevel@tonic-gate    @INC = '../lib' if -d '../lib';
10*0Sstevel@tonic-gate    END;
11*0Sstevel@tonic-gate}
12*0Sstevel@tonic-gateEND{
13*0Sstevel@tonic-gate  1 while unlink @files;
14*0Sstevel@tonic-gate}
15*0Sstevel@tonic-gate
16*0Sstevel@tonic-gate
17*0Sstevel@tonic-gateprint "1..1\n";
18*0Sstevel@tonic-gate
19*0Sstevel@tonic-gate{# Test 1: that we can open files
20*0Sstevel@tonic-gate     for my $path ( @files ){
21*0Sstevel@tonic-gate	 cacheout $path;
22*0Sstevel@tonic-gate	 print $path "$path 1\n";
23*0Sstevel@tonic-gate     }
24*0Sstevel@tonic-gate     print "not " unless scalar map({ -f } @files) == scalar @files;
25*0Sstevel@tonic-gate     print "ok 1\n";
26*0Sstevel@tonic-gate}
27