]> git.vpit.fr Git - perl/modules/Scope-Upper.git/blobdiff - t/23-localize-ctl.t
Update VPIT::TestHelpers to 6ca15279
[perl/modules/Scope-Upper.git] / t / 23-localize-ctl.t
index 13fb193a6266ebc2d71c8c3a371b041619d10d73..b72be227f4a8ca94783e56af611df612761852e0 100644 (file)
@@ -5,7 +5,7 @@ use warnings;
 
 use Test::More tests => 44 + 30;
 
-use Scope::Upper qw/localize UP HERE/;
+use Scope::Upper qw<localize UP HERE>;
 
 our ($x, $y);
 
@@ -190,9 +190,15 @@ $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;
 
  eval <<' GIVEN_TEST_1';
+  BEGIN {
+   if ("$]" >= 5.017_011) {
+    require warnings;
+    warnings->unimport('experimental::smartmatch');
+   }
+  }
   use feature 'switch';
   local $y;
   {
@@ -214,6 +220,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 +249,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 +276,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 +305,12 @@ SKIP:
  fail $@ if $@;
 
  eval <<' GIVEN_TEST_5';
+  BEGIN {
+   if ("$]" >= 5.017_011) {
+    require warnings;
+    warnings->unimport('experimental::smartmatch');
+   }
+  }
   use feature 'switch';
   local $y;
   {