diff options
author | Dave Mitchell <davem@iabyn.com> | 2016-01-07 11:36:10 +1100 |
---|---|---|
committer | Tony Cook <tony@develop-help.com> | 2016-01-11 09:12:59 +1100 |
commit | 2f9365dc3b09bdf83c00a6d176d882057608308e (patch) | |
tree | f9e8dd13fc208fefd61b3ff3a693fde84112c819 /t | |
parent | 5c1db5695506e43718a1575bebb1ecf2675e3798 (diff) | |
download | perl-2f9365dc3b09bdf83c00a6d176d882057608308e.tar.gz |
[perl #126633] check children of OA_DANGEROUS ops for common scalars
Tony Cook: added tests
Diffstat (limited to 't')
-rw-r--r-- | t/op/aassign.t | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/t/op/aassign.t b/t/op/aassign.t index 03cc84c3f4..e1c687c45b 100644 --- a/t/op/aassign.t +++ b/t/op/aassign.t @@ -382,6 +382,14 @@ SKIP: { my $orig; ($proxy[0], $orig) = (1, $set); is($orig, 0, 'previous value of $set'); + + # from cpan #110278 + use List::Util qw(min); + my $x = 1; + my $y = 2; + ( $x, $y ) = ( min($y), min($x) ); + is($x, 2, "check swap for \$x"); + is($y, 1, "check swap for \$y"); } done_testing(); |