3 use Test::More tests => 5;
8 use Storable qw(dclone);
10 # First, lets create a dataset for the illustrious foo package
12 my %data = (package => q(foo),
13 found_versions => ['bar/1.00',
17 fixed_versions => ['bar/1.02',
23 use_ok('Debbugs::Status',qw(:versions));
24 # check removefoundversions
25 my $data = dclone(\%data);
26 removefoundversions($data,$data->{package},'1.00');
27 is_deeply($data->{found_versions},['1.34'],'removefoundversions removes all 1.00 versions');
28 $data = dclone(\%data);
29 removefoundversions($data,$data->{package},'bar/1.00');
30 is_deeply($data->{found_versions},['1.00','1.34'],'removefoundversions removes only bar/1.00 versions');
31 $data = dclone(\%data);
32 addfoundversions($data,$data->{package},'1.45');
33 is_deeply($data->{fixed_versions},['bar/1.02'],'addfoundversions removes fixed versions');
34 is_deeply($data->{found_versions},['bar/1.00',
38 ],,'addfoundversions adds found versions');