Cross Reference: 01open.t
xref
: /
osnet-11
/
usr
/
src
/
cmd
/
perl
/
5.8.4
/
distrib
/
lib
/
FileCache
/
t
/
01open.t
Home
History
Annotate
Line#
Navigate
Download
Search
only in
./
1
N/A
#!./perl
1
N/A
use
FileCache
;
1
N/A
use
vars
qw
(@
files
)
;
1
N/A
BEGIN
{
1
N/A
@
files
=
qw
(
foo
bar
baz
quux
Foo_Bar
)
;
1
N/A
chdir
't'
if
-d
't'
;
1
N/A
1
N/A
#For tests within the perl distribution
1
N/A
@
INC
=
'../lib'
if
-d
'../lib'
;
1
N/A
END
;
1
N/A
}
1
N/A
END
{
1
N/A
1
while
unlink
@
files
;
1
N/A
}
1
N/A
1
N/A
1
N/A
print
"1..1\n"
;
1
N/A
1
N/A
{
# Test 1: that we can open files
1
N/A
for
my
$path
( @
files
)
{
1
N/A
cacheout
$path
;
1
N/A
print
$path
"
$path
1\n"
;
1
N/A
}
1
N/A
print
"not "
unless
scalar
map
(
{ -f } @
files
) ==
scalar
@
files
;
1
N/A
print
"ok 1\n"
;
1
N/A
}