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