diff options
author | Mark-Jason Dominus <mjd@plover.com> | 2002-03-03 04:32:16 -0500 |
---|---|---|
committer | Abhijit Menon-Sen <ams@wiw.org> | 2002-03-03 13:39:09 +0000 |
commit | 8c2040069d8b319e6bc1081d9acb663977b2bc8f (patch) | |
tree | 6d90235282f3a815639583c65db0d89439703e03 /t | |
parent | 103b575a610fa266138f0ab0655f26f83244bca8 (diff) | |
download | perl-8c2040069d8b319e6bc1081d9acb663977b2bc8f.tar.gz |
Re: PATCH (bleadperl): Quieter handling of tied arrays
Message-Id: <20020303143216.10536.qmail@plover.com>
p4raw-id: //depot/perl@14961
Diffstat (limited to 't')
-rwxr-xr-x | t/op/tiearray.t | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/t/op/tiearray.t b/t/op/tiearray.t index 8e78b2f76b..3d0004b28e 100755 --- a/t/op/tiearray.t +++ b/t/op/tiearray.t @@ -101,7 +101,7 @@ sub SPLICE package main; -print "1..31\n"; +print "1..35\n"; my $test = 1; {my @ary; @@ -187,6 +187,7 @@ print "ok ", $test++,"\n"; @ary = split(/:/,'1:2:3'); print "not " unless join(':',@ary) eq '1:2:3'; print "ok ", $test++,"\n"; + my $t = 0; foreach $n (@ary) @@ -195,6 +196,25 @@ foreach $n (@ary) print "ok ", $test++,"\n"; } +# (30-33) 20020303 MJD +@ary = (); +$seen{POP} = 0; +pop @ary; # this didn't used to call POP at all +print "not " unless $seen{POP} == 1; +print "ok ", $test++,"\n"; +$seen{SHIFT} = 0; +shift @ary; # this didn't used to call SHIFT at all +print "not " unless $seen{SHIFT} == 1; +print "ok ", $test++,"\n"; +$seen{PUSH} = 0; +push @ary; # this didn't used to call PUSH at all +print "not " unless $seen{PUSH} == 1; +print "ok ", $test++,"\n"; +$seen{UNSHIFT} = 0; +unshift @ary; # this didn't used to call UNSHIFT at all +print "not " unless $seen{UNSHIFT} == 1; +print "ok ", $test++,"\n"; + @ary = qw(3 2 1); print "not " unless join(':',@ary) eq '3:2:1'; print "ok ", $test++,"\n"; |