File: two-dots.t

package info (click to toggle)
libsoftware-license-perl 0.104007-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 732 kB
  • sloc: perl: 6,931; makefile: 2
file content (53 lines) | stat: -rw-r--r-- 885 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#!perl
use strict;
use warnings;

use Test::More;

my @licenses = qw(
    AGPL_3
    Apache_1_1
    Apache_2_0
    Artistic_1_0
    Artistic_2_0
    BSD
    CC0_1_0
    EUPL_1_1
    EUPL_1_2
    FreeBSD
    GFDL_1_2
    GPL_1
    GPL_2
    GPL_3
    LGPL_2_1
    LGPL_3_0
    MIT
    Mozilla_1_0
    Mozilla_1_1
    Mozilla_2_0
    None
    OpenSSL
    Perl_5
    QPL_1_0
    SSLeay
    Sun
    Zlib
);

for my $l (@licenses) {
    my $class = 'Software::License::' . $l;
    require_ok($class);

    my $license = $class->new( { holder => 'Corporation, Inc.' } );

    unlike(
        $license->notice, qr/\QCorporation, Inc../,
        "holder with trailing dot does not leave two dots in notice text - $l"
    );
    unlike(
        $license->license, qr/\QCorporation, Inc../,
        "holder with trailing dot does not leave two dots in license text - $l"
    );
}

done_testing;