Subject: | [PATCH] Fix tests for undef identity preservation |
Now that &PL_sv_undef no longer has special meaning in an array, the tests fail, as they expect it to have special meaning. I think the new behaviour of Data::Alias resulting from ce0d59f is more correct.
Subject: | open_VLwha7bM.txt |
diff -rup Data-Alias-1.17-2L_vVG-orig/t/07_alias_anon_array.t Data-Alias-1.17-2L_vVG/t/07_alias_anon_array.t
--- Data-Alias-1.17-2L_vVG-orig/t/07_alias_anon_array.t 2011-11-17 13:42:27.000000000 -0800
+++ Data-Alias-1.17-2L_vVG/t/07_alias_anon_array.t 2013-08-27 06:21:35.000000000 -0700
@@ -30,7 +30,7 @@ is_deeply refs(@$x), refs($x, $y, $z);
$x = alias [undef, $y, undef];
is @$x, 3;
is \$x->[1], \$y;
-ok !exists $x->[0];
-ok !exists $x->[2];
+ok !exists $x->[0] || \$x->[0] eq \undef;
+ok !exists $x->[2] || \$x->[2] eq \undef;
# vim: ft=perl
diff -rup Data-Alias-1.17-2L_vVG-orig/t/19_alias_aelem.t Data-Alias-1.17-2L_vVG/t/19_alias_aelem.t
--- Data-Alias-1.17-2L_vVG-orig/t/19_alias_aelem.t 2011-11-17 13:42:27.000000000 -0800
+++ Data-Alias-1.17-2L_vVG/t/19_alias_aelem.t 2013-08-27 06:22:55.000000000 -0700
@@ -29,7 +29,7 @@ alias { is \(local $x[0] = $x[1]), \$x[1
is \$x[0], \$x[2];
is \alias($x[0] = undef), \undef;
-ok !exists $x[0];
+ok !exists $x[0] || \$x[0] eq \undef;
my @y;
@@ -52,9 +52,9 @@ alias { is \(local $y[0] = $y[1]), \$y[1
is \$y[0], \$y[2];
is \alias($y[0] = undef), \undef;
-ok !exists $y[0];
+ok !exists $y[0] || \$y[0] eq \undef;
sub{alias my ($x) = @_}->($y[0]);
-ok exists $y[0];
+ok exists $y[0] || \$y[0] eq \undef;
# vim: ft=perl