File: iso639-2.t

package info (click to toggle)
libdatetime-locale-perl 1%3A1.37-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 19,856 kB
  • sloc: perl: 225,932; sh: 23; makefile: 2
file content (24 lines) | stat: -rw-r--r-- 641 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
use strict;
use warnings;

use Test2::V0;
use Test::File::ShareDir::Dist { 'DateTime-Locale' => 'share' };

use DateTime::Locale;

my @aliases = qw( chi per khm );

for my $alias (@aliases) {
    ok( DateTime::Locale->load($alias), "alias mapping for $alias exists" );
}

my $locale = DateTime::Locale->load('eng_US');

is( $locale->code, 'en-US', 'code is en-US' );

is( $locale->name,      'English United States', 'name()' );
is( $locale->language,  'English',               'language()' );
is( $locale->territory, 'United States',         'territory()' );
is( $locale->variant,   undef,                   'variant()' );

done_testing();