summaryrefslogtreecommitdiff
path: root/dist/Module-CoreList/t/deprecated.t
blob: 020738f088a2cee805876c9a5ab07fe1d6b6ab5e (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
#!perl -w
use strict;
use Test::More tests => 9;

require_ok('Module::CoreList');

ok($Module::CoreList::deprecated{5.011000}, "5.011000 (deprecated list)");

ok(!exists $Module::CoreList::deprecated{5.011000}{'File::Spec'},
   "File::Spec not deprecated in 5.011000 (hash)"
);

ok(! Module::CoreList::is_deprecated('File::Spec'),
   "File::Spec currently is not deprecated (function)"
);

ok(exists $Module::CoreList::deprecated{5.011000}{'Switch'},
   "Switch deprecated in 5.011000 (hash)"
);

is(!! Module::CoreList::is_deprecated('Switch'), !! ($] >= 5.011 and $] < 5.013001 ),
   "Switch deprecated current perl (if pre-5.13.1.) (function)"
);

ok(! Module::CoreList::is_deprecated('Switch', 5.010000), 
   "Switch not deprecated in 5.010000 (function w/ perl version)"
);

is(Module::CoreList::deprecated_in('Switch'), 5.011000,
   "Switch was deprecated in 5.011000 (deprecated_in)"
);

ok(! Module::CoreList::deprecated_in('File::Spec'),
   "File::Spec currently is not deprecated (deprecated_in)"
);