summaryrefslogtreecommitdiff
path: root/t/op
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>1999-07-25 16:14:39 +0000
committerJarkko Hietaniemi <jhi@iki.fi>1999-07-25 16:14:39 +0000
commitca30992f0a6aba514ace6cc49000c6f5f9a9948b (patch)
treec9c03b9536f56e3dc3b604e8c6c36bf9c0ab5f2e /t/op
parent81c6dfba30e15b4c66bffa9d05458e72734d0c34 (diff)
parent2135512ed9c202c6f2dec388d70c8833fa0bbfb1 (diff)
downloadperl-ca30992f0a6aba514ace6cc49000c6f5f9a9948b.tar.gz
Integrate with Sarathy.
p4raw-id: //depot/cfgperl@3742
Diffstat (limited to 't/op')
-rwxr-xr-xt/op/each.t17
-rwxr-xr-xt/op/misc.t8
-rw-r--r--t/op/re_tests1
3 files changed, 23 insertions, 3 deletions
diff --git a/t/op/each.t b/t/op/each.t
index 9063c2c3ed..879c0d0fd3 100755
--- a/t/op/each.t
+++ b/t/op/each.t
@@ -1,8 +1,6 @@
#!./perl
-# $RCSfile: each.t,v $$Revision: 4.1 $$Date: 92/08/07 18:27:47 $
-
-print "1..16\n";
+print "1..19\n";
$h{'abc'} = 'ABC';
$h{'def'} = 'DEF';
@@ -120,3 +118,16 @@ while (($key, $value) = each(h)) {
}
}
if ($i == 5) { print "ok 16\n" } else { print "not ok\n" }
+
+{
+ package Obj;
+ sub DESTROY { print "ok 18\n"; }
+ {
+ my $h = { A => bless [], __PACKAGE__ };
+ while (my($k,$v) = each %$h) {
+ print "ok 17\n" if $k eq 'A' and ref($v) eq 'Obj';
+ }
+ }
+ print "ok 19\n";
+}
+
diff --git a/t/op/misc.t b/t/op/misc.t
index 8281bf0e77..926c7f38d0 100755
--- a/t/op/misc.t
+++ b/t/op/misc.t
@@ -497,3 +497,11 @@ END { print $foo }
';
EXPECT
ZZZ
+########
+-w
+if (@ARGV) { print "" }
+else {
+ if ($x == 0) { print "" } else { print $x }
+}
+EXPECT
+Use of uninitialized value at - line 4.
diff --git a/t/op/re_tests b/t/op/re_tests
index cbcb7251b1..34b6e29414 100644
--- a/t/op/re_tests
+++ b/t/op/re_tests
@@ -714,3 +714,4 @@ a(?{$a=2;$b=3;($b)=$a})b yabz y $b 2
round\(((?>[^()]+))\) _I(round(xs * sz),1) y $1 xs * sz
'((?x:.) )' x y $1- x -
'((?-x:.) )'x x y $1- x-
+foo.bart foo.bart y - -