diff options
Diffstat (limited to 'lib/Memoize/t/expfile.t')
-rw-r--r-- | lib/Memoize/t/expfile.t | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/lib/Memoize/t/expfile.t b/lib/Memoize/t/expfile.t index 9959d00313..c81bfd494f 100644 --- a/lib/Memoize/t/expfile.t +++ b/lib/Memoize/t/expfile.t @@ -4,6 +4,7 @@ use lib '..'; use Memoize; my $n = 0; +$|=1; if (-e '.fast') { @@ -12,7 +13,7 @@ if (-e '.fast') { } print "1..12\n"; - +# (1) ++$n; print "ok $n\n"; my $READFILE_CALLS = 0; @@ -35,6 +36,7 @@ sub readfile { } require Memoize::ExpireFile; +# (2) ++$n; print "ok $n\n"; tie my %cache => 'Memoize::ExpireFile'; @@ -43,22 +45,27 @@ memoize 'readfile', LIST_CACHE => 'FAULT' ; +# (3) ++$n; print "ok $n\n"; +# (4) writefile($FILE); ++$n; print "ok $n\n"; -sleep 1; +sleep 4; +# (5-6) my $t1 = readfile($FILE); ++$n; print "ok $n\n"; ++$n; print ((($READFILE_CALLS == 1) ? '' : 'not '), "ok $n\n"); +# (7-9) my $t2 = readfile($FILE); -++$n; print "ok $n\n"; +++$n; print "ok $n\n"; ++$n; print ((($READFILE_CALLS == 1) ? '' : 'not '), "ok $n\n"); ++$n; print ((($t1 eq $t2) ? '' : 'not '), "ok $n\n"); -sleep 2; +# (10-12) +sleep 4; writefile($FILE); my $t3 = readfile($FILE); ++$n; print "ok $n\n"; |