Add the original source packages to maemo, source lenny
[dh-make-perl] / dev / i386 / libpar-dist-perl / libpar-dist-perl-0.31 / t / 02parsedistname.t
1 use strict;
2 use warnings;
3 our @tests;
4
5 BEGIN {
6     @tests = (
7         'Math-Symbolic-0.502-x86_64-linux-gnu-thread-multi-5.8.7.par'
8             => ['Math-Symbolic', '0.502', 'x86_64-linux-gnu-thread-multi', '5.8.7'],
9         'Math-Symbolic-0.502.tar.gz'
10             => ['Math-Symbolic', '0.502', undef, undef],
11         'Foo-0.5.3_1-x86-win32-thread-multi-any_version'
12         => ['Foo', '0.5.3_1', 'x86-win32-thread-multi', 'any_version'],
13             'Foo-v0.5.3_1-MSWin32-x86-thread-multi-5.005_03'
14         => ['Foo', 'v0.5.3_1', 'MSWin32-x86-thread-multi', '5.005_03'],
15             'Foo-Bar-5-0.5.3_1-MSWin32-x86-thread-multi-5.005_03'
16         => ['Foo-Bar-5', '0.5.3_1', 'MSWin32-x86-thread-multi', '5.005_03'],
17     );
18 }
19
20 use Test::More tests => int(scalar(@tests)/2) + 1;
21
22 use_ok('PAR::Dist');
23
24 while (@tests) {
25         my $str = shift @tests;
26         my $res = shift @tests;
27         my @res = PAR::Dist::parse_dist_name($str);
28         is_deeply($res, \@res, "Parsing '$str'");
29 }