add types to FailRecheck step
[scpubgit/DX.git] / t / depmap.t
1 use strictures 2;
2 use DX::Utils qw(:all);
3 use DX::DependencyMap;
4 use List::Util qw(reduce);
5 use Test::More;
6
7 my $start = DX::DependencyMap->new(deps => {}, revdeps => {});
8
9 {
10
11   my @xyz = qw(x x.y x.z);
12
13   my $content = reduce {
14     $a->with_entry_for($b, [ [ CONTENTS_OF ,=> split(/\./,$b) ] ])
15   } $start, @xyz;
16
17   is(
18     (join ' ', sort $content->_dependents_of([ VALUE_SET ,=> qw(x y) ])),
19    'x x.y',
20    'x.y set clears contents_of x',
21   );
22   is(
23     (join ' ', sort $content->_dependents_of([ VALUE_SET ,=> qw(x) ])),
24     'x x.y x.z',
25     'x set clears contents_of all x.*',
26   );
27 }
28
29 done_testing;