]> git.vpit.fr Git - perl/modules/Variable-Temp.git/blobdiff - t/20-lvalue.t
'temp $scalar;' should undef $scalar
[perl/modules/Variable-Temp.git] / t / 20-lvalue.t
index 90da2a98b24f520ef30cca056d04f06c1798af85..e9a3850f979b0908b792c06f01d7e4d0e2b73d41 100644 (file)
@@ -9,7 +9,7 @@ use Test::More;
 
 BEGIN {
  if ("$]" >= 5.014) {
-  plan tests => 7 + 13;
+  plan tests => 9 + 15;
  } else {
   plan skip_all => 'perl 5.14 required to lvalue assignment with prototype \[$@%]';
  }
@@ -31,6 +31,11 @@ is $x, 1;
  is $x, 3;
 }
 is $x, 1;
+{
+ temp $x;
+ is $x, undef;
+}
+is $x, 1;
 
 our $y = 1;
 is $y, 1;
@@ -65,3 +70,8 @@ is $y, 1;
  is $y, 3;
 }
 is $y, 1;
+{
+ temp $y;
+ is $y, undef;
+}
+is $y, 1;