]> git.vpit.fr Git - perl/modules/Variable-Temp.git/blobdiff - t/10-base.t
Skip localized extraneous array elements tests
[perl/modules/Variable-Temp.git] / t / 10-base.t
index 701ceadcb92bfeb6934dd232e82cc747a169b383..dc1081cfba568f51eef90fc9f2247e0ab76b2736 100644 (file)
@@ -12,6 +12,9 @@ sub describe {
  return join ', ', map "$_:$h->{$_}", sort keys %$h;
 }
 
+my $aelem_delete_msg = 'Localized extraneous array elements do not reset array length at scope end before perl 5.12';
+my $aelem_delete_ok  = ("$]" >= 5.012);
+
 # Lexicals
 
 {
@@ -72,7 +75,8 @@ sub describe {
  {
   set_temp @y => [ qw<a b c> ];
   is "@y", 'a b c';
-  {
+  SKIP: {
+   skip $aelem_delete_msg => 3 unless $aelem_delete_ok;
    local $y[1] = 'd';
    is "@y", 'a d c';
    {
@@ -211,7 +215,8 @@ sub describe {
  {
   set_temp @Y => [ qw<a b c> ];
   is "@Y", 'a b c';
-  {
+  SKIP: {
+   skip $aelem_delete_msg => 3 unless $aelem_delete_ok;
    local $Y[1] = 'd';
    is "@Y", 'a d c';
    {