File: 11export.t

package info (click to toggle)
libb-utils-perl 0.27-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 440 kB
  • sloc: perl: 663; ansic: 37; makefile: 3
file content (25 lines) | stat: -rw-r--r-- 678 bytes parent folder | download | duplicates (6)
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
use Test::More tests => 12;
use strict;
use B::Utils;

ok( B::Utils->can('import'), "Can import()" );

is( scalar(@B::Utils::EXPORTS), 0, "Nothing is exported without asking" );

is( scalar( @{ $B::Utils::EXPORT_TAGS{all} } ),
    scalar(@B::Utils::EXPORT_OK),
    "All optional exports are exported via :all"
);

# Test for function exports
for my $function (
    qw( all_starts all_roots anon_subs recalc_sub_cache
    walkoptree_simple walkoptree_filtered
    walkallops_simple walkallops_filtered )
    )
{
    ok( eval { B::Utils->import($function); 1 },
        "B::Utils exports $function" );
}

cmp_ok( B::Utils->VERSION, '>=', 0.01, "B::Utils->VERSION is specified" );