]> git.donarmstrong.com Git - debbugs.git/blob - t/03_versions.t
merge changes from dla mainline
[debbugs.git] / t / 03_versions.t
1 # -*- mode: cperl;-*-
2
3 use Test::More tests => 3;
4
5 use warnings;
6 use strict;
7
8 use Storable qw(dclone);
9
10 # First, lets create a dataset for the illustrious foo package
11
12 my %data = (package => q(foo),
13             found_versions   => ['bar/1.00',
14                                  '1.00',
15                                  '1.34',
16                                 ],
17             fixed_versions   => ['bar/1.02',
18                                  '1.45',
19                                 ],
20            );
21
22
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');