| 1 | #!perl -w |
| 2 | use strict; |
| 3 | use Test::More tests => 9; |
| 4 | |
| 5 | require_ok('Module::CoreList'); |
| 6 | |
| 7 | ok($Module::CoreList::deprecated{5.011000}, "5.011000 (deprecated list)"); |
| 8 | |
| 9 | ok(!exists $Module::CoreList::deprecated{5.011000}{'File::Spec'}, |
| 10 | "File::Spec not deprecated in 5.011000 (hash)" |
| 11 | ); |
| 12 | |
| 13 | ok(! Module::CoreList::is_deprecated('File::Spec'), |
| 14 | "File::Spec currently is not deprecated (function)" |
| 15 | ); |
| 16 | |
| 17 | ok(exists $Module::CoreList::deprecated{5.011000}{'Switch'}, |
| 18 | "Switch deprecated in 5.011000 (hash)" |
| 19 | ); |
| 20 | |
| 21 | is(!! Module::CoreList::is_deprecated('Switch'), !! ($] >= 5.011 and $] < 5.013001 ), |
| 22 | "Switch deprecated current perl (if pre-5.13.1.) (function)" |
| 23 | ); |
| 24 | |
| 25 | ok(! Module::CoreList::is_deprecated('Switch', 5.010000), |
| 26 | "Switch not deprecated in 5.010000 (function w/ perl version)" |
| 27 | ); |
| 28 | |
| 29 | is(Module::CoreList::deprecated_in('Switch'), 5.011000, |
| 30 | "Switch was deprecated in 5.011000 (deprecated_in)" |
| 31 | ); |
| 32 | |
| 33 | ok(! Module::CoreList::deprecated_in('File::Spec'), |
| 34 | "File::Spec currently is not deprecated (deprecated_in)" |
| 35 | ); |