diff options
author | Mike Guy <mjtg@cam.ac.uk> | 2000-08-14 09:04:22 +0100 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2000-08-14 13:58:45 +0000 |
commit | 03a27ae7a2d77f4526cc8f95901f616c50fdc14b (patch) | |
tree | 93c9e1c66e63be081d2f6d955aaa6abc7d7284e1 /t | |
parent | 208edb77a29d217fb751c222223477b9e3fc3fd6 (diff) | |
download | perl-03a27ae7a2d77f4526cc8f95901f616c50fdc14b.tar.gz |
@+, @- readonly (was Re: @<punct> interpolating in "")
Message-Id: <E13OEII-0007B2-00@libra.cus.cam.ac.uk>
p4raw-id: //depot/perl@6615
Diffstat (limited to 't')
-rwxr-xr-x | t/op/pat.t | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/t/op/pat.t b/t/op/pat.t index fbc234b74d..91c4b7d58f 100755 --- a/t/op/pat.t +++ b/t/op/pat.t @@ -4,7 +4,7 @@ # the format supported by op/regexp.t. If you want to add a test # that does fit that format, add it to op/re_tests, not here. -print "1..216\n"; +print "1..220\n"; BEGIN { chdir 't' if -d 't'; @@ -693,6 +693,30 @@ print "not " print "ok $test\n"; $test++; +eval { $+[0] = 13; }; +print "not " + if $@ !~ /^Modification of a read-only value attempted/; +print "ok $test\n"; +$test++; + +eval { $-[0] = 13; }; +print "not " + if $@ !~ /^Modification of a read-only value attempted/; +print "ok $test\n"; +$test++; + +eval { @+ = (7, 6, 5); }; +print "not " + if $@ !~ /^Modification of a read-only value attempted/; +print "ok $test\n"; +$test++; + +eval { @- = qw(foo bar); }; +print "not " + if $@ !~ /^Modification of a read-only value attempted/; +print "ok $test\n"; +$test++; + /.(a)(ba*)?/; print "#$#-..$#+\nnot " if $#+ != 2 or $#- != 1; print "ok $test\n"; |