X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=t%2F23-localize-ctl.t;h=aaefdb636b8d1222b43c17d3d180ca76c160d4a7;hb=2d6e98ca9b8fd44cc4a4575fda08d045da8d43e5;hp=0bd356368d46d85c46e67c98d09ead8ee07fae9b;hpb=daa5478303f254eff6015045396920baafee0688;p=perl%2Fmodules%2FScope-Upper.git diff --git a/t/23-localize-ctl.t b/t/23-localize-ctl.t index 0bd3563..aaefdb6 100644 --- a/t/23-localize-ctl.t +++ b/t/23-localize-ctl.t @@ -190,9 +190,17 @@ $y = undef; SKIP: { - skip 'Perl 5.10 required to test given/when' => 30 if $] < 5.010; + skip 'Perl 5.10 required to test given/when' => 30 if "$]" < 5.010; + skip 'Not testing deprecated given/when on Perl 5.37.10 or later' + => 30 if "$]" >= 5.037010; eval <<' GIVEN_TEST_1'; + BEGIN { + if ("$]" >= 5.017_011) { + require warnings; + warnings->unimport('experimental::smartmatch'); + } + } use feature 'switch'; local $y; { @@ -214,6 +222,12 @@ SKIP: fail $@ if $@; eval <<' GIVEN_TEST_2'; + BEGIN { + if ("$]" >= 5.017_011) { + require warnings; + warnings->unimport('experimental::smartmatch'); + } + } use feature 'switch'; local $y; { @@ -237,6 +251,12 @@ SKIP: fail $@ if $@; eval <<' GIVEN_TEST_3'; + BEGIN { + if ("$]" >= 5.017_011) { + require warnings; + warnings->unimport('experimental::smartmatch'); + } + } use feature 'switch'; local $y; { @@ -258,6 +278,12 @@ SKIP: fail $@ if $@; eval <<' GIVEN_TEST_4'; + BEGIN { + if ("$]" >= 5.017_011) { + require warnings; + warnings->unimport('experimental::smartmatch'); + } + } use feature 'switch'; local $y; { @@ -281,6 +307,12 @@ SKIP: fail $@ if $@; eval <<' GIVEN_TEST_5'; + BEGIN { + if ("$]" >= 5.017_011) { + require warnings; + warnings->unimport('experimental::smartmatch'); + } + } use feature 'switch'; local $y; {