]> git.vpit.fr Git - perl/modules/Scope-Upper.git/blobdiff - t/23-localize-ctl.t
t/ - Given is deprecated in 5.37.10, do not test it
[perl/modules/Scope-Upper.git] / t / 23-localize-ctl.t
index 5f4046ea4b44fdd649c7852755b8021bd0496f7d..aaefdb636b8d1222b43c17d3d180ca76c160d4a7 100644 (file)
@@ -191,8 +191,16 @@ $y = undef;
 SKIP:
 {
  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;
   {