summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorIlya Zakharevich <ilya@math.berkeley.edu>1998-01-11 15:34:05 -0500
committerMalcolm Beattie <mbeattie@sable.ox.ac.uk>1998-02-06 16:01:36 +0000
commitcc6b73957505a73b130c87add7bf3d534f129041 (patch)
tree9eae2f71c172110fb9ec7dfb5f002ebb937fd46c /t
parente5724059399517e049ad3e9429cfece6d66ce97f (diff)
downloadperl-cc6b73957505a73b130c87add7bf3d534f129041.tar.gz
5.004_56: Patch to Tie::Hash and docs
Date: Sun, 11 Jan 1998 20:34:05 -0500 (EST) Subject: 5.004_56: Patch to (?{}) quoting + cosmetic Date: Mon, 2 Feb 1998 01:28:46 -0500 (EST) p4raw-id: //depot/perl@470
Diffstat (limited to 't')
-rwxr-xr-xt/op/misc.t1
-rwxr-xr-xt/op/pat.t16
2 files changed, 12 insertions, 5 deletions
diff --git a/t/op/misc.t b/t/op/misc.t
index 326273aff1..7a7fc334d3 100755
--- a/t/op/misc.t
+++ b/t/op/misc.t
@@ -338,6 +338,7 @@ print "you die joe!\n" unless "@x" eq 'x y z';
########
/(?{"{"})/ # Check it outside of eval too
EXPECT
+Sequence (?{...}) not terminated or not {}-balanced at - line 1, within pattern
/(?{"{"})/: Sequence (?{...}) not terminated or not {}-balanced at - line 1.
########
/(?{"{"}})/ # Check it outside of eval too
diff --git a/t/op/pat.t b/t/op/pat.t
index a9e6869a4a..5d8bf8ad78 100755
--- a/t/op/pat.t
+++ b/t/op/pat.t
@@ -2,7 +2,7 @@
# $RCSfile: pat.t,v $$Revision: 4.1 $$Date: 92/08/07 18:28:12 $
-print "1..100\n";
+print "1..101\n";
$x = "abc\ndef\n";
@@ -274,7 +274,7 @@ $_ = " a (bla()) and x(y b((l)u((e))) and b(l(e)e)e";
$expect = "(bla()) ((l)u((e))) (l(e)e)";
sub matchit {
- m'
+ m/
(
\(
(?{ $c = 1 }) # Initialize
@@ -301,7 +301,7 @@ sub matchit {
(?!
) # Fail
) # Otherwise the chunk 1 may succeed with $c>0
- 'xg;
+ /xg;
}
push @ans, $res while $res = matchit;
@@ -321,9 +321,15 @@ print "not " if "@ans" ne 'a/ b';
print "ok $test\n";
$test++;
-$code = '$blah = 45';
+$code = '{$blah = 45}';
$blah = 12;
-/(?{$code})/;
+/(?$code)/;
+print "not " if $blah != 45;
+print "ok $test\n";
+$test++;
+
+$blah = 12;
+/(?{$blah = 45})/;
print "not " if $blah != 45;
print "ok $test\n";
$test++;