File: version-check.t

package info (click to toggle)
libdatetime-locale-perl 1%3A1.41-1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 26,068 kB
  • sloc: perl: 286,446; sh: 23; makefile: 2
file content (35 lines) | stat: -rw-r--r-- 642 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
use strict;
use warnings;

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

{
    package DateTime::Locale::fake;

    use strict;
    use warnings;

    use DateTime::Locale;

    use base 'DateTime::Locale::Base';

    sub cldr_version {0}

    DateTime::Locale->register(
        id          => 'fake',
        en_language => 'Fake',
    );
}

is(
    warnings { DateTime::Locale->load('fake') },
    array {
        item 0 => match qr/\Qfrom an older version (0)/;
        end();
    },
    'got a warning when loading a locale from an older CLDR version'
);

done_testing()