File: 141_greenland.t

package info (click to toggle)
libregexp-common-perl 2024080801-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,328 kB
  • sloc: perl: 17,842; makefile: 2
file content (45 lines) | stat: -rwxr-xr-x 828 bytes parent folder | download | duplicates (3)
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
#!/usr/bin/perl

use strict;
use warnings;
no  warnings 'syntax';

use lib ".";

use Regexp::Common;
use Test::More;
use t::zip::Zip;

my $r = eval "require Test::Regexp; 1";

unless ($r) {
    print "1..0 # SKIP Test::Regexp not found\n";
    exit;
}


test_zips country         =>  "Greenland",
          name            =>  "Greenlandic zip codes",
          prefix          => {
              iso         =>  "GL",
              cept        =>  "GL",
              invalid     =>  "DE",
          },
          prefix_test_set => [3940, 3955],
;


done_testing;


sub valid_zip_codes {
    2412,

    3900,   3905,   3910 .. 3913,   3915,           3919 .. 3924,
    3930,   3932,   3940,           3950 .. 3953,   3955,
    3961 .. 3962,   3964,           3970 .. 3972,   3980,   3982,
    3984 .. 3985,   3992,
}


__END__