summaryrefslogtreecommitdiff
path: root/t/release-pp-37-exports.t
blob: 607aefc73aaa8a5bcf429c9505355afb5422f26c (plain)
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
54
55
56
57
58
59
60
61
62
63
64
65


use Test::More;

BEGIN {
    unless ( $ENV{RELEASE_TESTING} ) {
        plan skip_all => 'these tests are for release testing';
    }

    $ENV{PV_TEST_PERL} = 1;
}

use strict;
use warnings;

use Test::More;
use Params::Validate ();

my @types = qw(
    SCALAR
    ARRAYREF
    HASHREF
    CODEREF
    GLOB
    GLOBREF
    SCALARREF
    HANDLE
    BOOLEAN
    UNDEF
    OBJECT
);

my @subs = qw(
    validate
    validate_pos
    validation_options
    validate_with
);

is_deeply(
    [ sort @Params::Validate::EXPORT_OK ],
    [ sort @types, @subs, 'set_options' ],
    '@EXPORT_OK'
);

is_deeply(
    [ sort keys %Params::Validate::EXPORT_TAGS ],
    [qw( all types )],
    'keys %EXPORT_TAGS'
);

is_deeply(
    [ sort @{ $Params::Validate::EXPORT_TAGS{all} } ],
    [ sort @types, @subs ],
    '$EXPORT_TAGS{all}',
);

is_deeply(
    [ sort @{ $Params::Validate::EXPORT_TAGS{types} } ],
    [ sort @types ],
    '$EXPORT_TAGS{types}',
);

done_testing();