X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=t%2F55-yield-target.t;h=682d4cc9758b6a6b80f90e6c677e815217bc7b61;hb=c8fb3ada01d8c1a6ac1a37778edb0fc9164d7bf1;hp=f927d20767d85689dd2bb31652861993f53497f7;hpb=6c74fb492a0404fa8822211cba07b1027ce3cfec;p=perl%2Fmodules%2FScope-Upper.git diff --git a/t/55-yield-target.t b/t/55-yield-target.t index f927d20..682d4cc 100644 --- a/t/55-yield-target.t +++ b/t/55-yield-target.t @@ -81,8 +81,16 @@ SKIP: { SKIP: { skip 'perl 5.10 is required to test interaction with given/when' => 6 if "$]" < 5.010; + skip 'Not testing deprecated given/when on Perl 5.37.10 or later' + => 6 if "$]" >= 5.037010; @res = eval <<'TESTCASE'; + BEGIN { + if ("$]" >= 5.017_011) { + require warnings; + warnings->unimport('experimental::smartmatch'); + } + } use feature 'switch'; (24, do { given (25) { @@ -98,6 +106,12 @@ TESTCASE # end of the enclosing given block. @res = (); eval <<'TESTCASE'; + BEGIN { + if ("$]" >= 5.017_011) { + require warnings; + warnings->unimport('experimental::smartmatch'); + } + } use feature 'switch'; @res = (28, do { given (29) { @@ -115,6 +129,12 @@ TESTCASE # But calling yield() in when() in for() sends us at the next iteration. @res = (); eval <<'TESTCASE'; + BEGIN { + if ("$]" >= 5.017_011) { + require warnings; + warnings->unimport('experimental::smartmatch'); + } + } use feature 'switch'; @res = (31, do { for (32, 33) {