]> git.vpit.fr Git - perl/modules/Variable-Temp.git/blobdiff - t/20-lvalue.t
Skip localized extraneous array elements tests
[perl/modules/Variable-Temp.git] / t / 20-lvalue.t
index 226eccc7d0d0e7186c023bf95e20b1edc26c5da6..f46032ec3f09ef457dabb828b486cd891c54417f 100644 (file)
@@ -20,6 +20,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
 
 {
@@ -80,7 +83,8 @@ sub describe {
  {
   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';
    {
@@ -219,7 +223,8 @@ sub describe {
  {
   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';
    {