### ----------------------------------------------------
### -- Pod::From::Cache
### -- Licenses: Artistic-2.0
### -- Authors: Richard Hainsworth, aka finanalyst
### -- File: xt/80-progress.rakutest
### ----------------------------------------------------
use Test;
use File::Directory::Tree;

constant CACHE = 'xt/cache';
constant DOC = 'xt/doctest';

use Pod::From::Cache;

rmtree CACHE;
my Pod::From::Cache $m;

plan 6;

$m .= new(:doc-source(DOC), :cache-path(CACHE), :progress( &count-down ) );

done-testing;

sub count-down(:$start,:$dec) {
    if $start {
        is $start , 5, 'start given correct number of files'
    }
    if $dec {
        ok $dec , 'dec called';
    }
}


