summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2007-03-02 14:42:27 +0000
committerNicholas Clark <nick@ccl4.org>2007-03-02 14:42:27 +0000
commit9e0d86f862e086b0fde6b64ca39c85508bf50910 (patch)
treebdbcc13f4e388616629b43018a0c457c375f8cf5 /t
parent06be3b4087230d77129ccda5ba56e0397c241c48 (diff)
downloadperl-9e0d86f862e086b0fde6b64ca39c85508bf50910.tar.gz
More assertion failures, found by auditing the code.
p4raw-id: //depot/perl@30443
Diffstat (limited to 't')
-rwxr-xr-xt/op/gv.t24
1 files changed, 23 insertions, 1 deletions
diff --git a/t/op/gv.t b/t/op/gv.t
index 4475912f53..d736138b62 100755
--- a/t/op/gv.t
+++ b/t/op/gv.t
@@ -12,7 +12,7 @@ BEGIN {
use warnings;
require './test.pl';
-plan( tests => 155 );
+plan( tests => 159 );
# type coersion on assignment
$foo = 'foo';
@@ -458,6 +458,28 @@ foreach my $value ([1,2,3], {1=>2}, *STDOUT{IO}, \&ok, *STDOUT{FORMAT}) {
*slosh::{HASH}->{ISA}=[];
slosh->import;
pass("gv_fetchmeth coped with the unexpected");
+
+ # An audit found these:
+ {
+ package slosh;
+ sub rip {
+ my $s = shift;
+ $s->SUPER::rip;
+ }
+ }
+ eval {slosh->rip;};
+ like ($@, qr/^Can't locate object method "rip"/, "Even with SUPER");
+
+ is(slosh->isa('swoosh'), '');
+
+ $CORE::GLOBAL::{"lock"}=[];
+ eval "no warnings; lock";
+ like($@, qr/^Not enough arguments for lock/,
+ "Can't trip up general keyword overloading");
+
+ $CORE::GLOBAL::{"readline"}=[];
+ eval "no warnings; <STDOUT>";
+ is($@, '', "Can't trip up readline overloading");
}
__END__
Perl