xref: /onnv-gate/usr/src/cmd/perl/5.8.4/distrib/lib/FileCache/t/04twoarg.t (revision 0:68f95e015346)
1*0Sstevel@tonic-gate#!./perl
2*0Sstevel@tonic-gateBEGIN {
3*0Sstevel@tonic-gate    use FileCache;
4*0Sstevel@tonic-gate    chdir 't' if -d 't';
5*0Sstevel@tonic-gate
6*0Sstevel@tonic-gate    #For tests within the perl distribution
7*0Sstevel@tonic-gate    @INC = '../lib' if -d '../lib';
8*0Sstevel@tonic-gate    END;
9*0Sstevel@tonic-gate}
10*0Sstevel@tonic-gateEND{
11*0Sstevel@tonic-gate  unlink('foo');
12*0Sstevel@tonic-gate}
13*0Sstevel@tonic-gate
14*0Sstevel@tonic-gateprint "1..1\n";
15*0Sstevel@tonic-gate
16*0Sstevel@tonic-gate{# Test 4: that 2 arg format works, and that we cycle on mode change
17*0Sstevel@tonic-gate     cacheout '>', "foo";
18*0Sstevel@tonic-gate     print foo "foo 4\n";
19*0Sstevel@tonic-gate     cacheout '+>', "foo";
20*0Sstevel@tonic-gate     print foo "foo 44\n";
21*0Sstevel@tonic-gate     seek(foo, 0, 0);
22*0Sstevel@tonic-gate     print 'not ' unless <foo> eq "foo 44\n";
23*0Sstevel@tonic-gate     print "ok 1\n";
24*0Sstevel@tonic-gate}
25