summaryrefslogtreecommitdiffstats
path: root/contrib/perl5/t/op/method.t
diff options
context:
space:
mode:
authormarkm <markm@FreeBSD.org>2002-03-16 20:14:30 +0000
committermarkm <markm@FreeBSD.org>2002-03-16 20:14:30 +0000
commit3eac21f49bc763a6c0044b4afbc0c7ece760144f (patch)
tree4cf1274fa3ca68f7ecf6a3051e0c2243e378afc5 /contrib/perl5/t/op/method.t
parent259bd53c06712c4ffb0ab7e06898c19ebf221b21 (diff)
downloadFreeBSD-src-3eac21f49bc763a6c0044b4afbc0c7ece760144f.zip
FreeBSD-src-3eac21f49bc763a6c0044b4afbc0c7ece760144f.tar.gz
Vendor import Perl 5.6.1
Diffstat (limited to 'contrib/perl5/t/op/method.t')
-rwxr-xr-xcontrib/perl5/t/op/method.t20
1 files changed, 19 insertions, 1 deletions
diff --git a/contrib/perl5/t/op/method.t b/contrib/perl5/t/op/method.t
index 1c6f3c5..be4df75 100755
--- a/contrib/perl5/t/op/method.t
+++ b/contrib/perl5/t/op/method.t
@@ -4,7 +4,12 @@
# test method calls and autoloading.
#
-print "1..49\n";
+BEGIN {
+ chdir 't' if -d 't';
+ @INC = '../lib';
+}
+
+print "1..53\n";
@A::ISA = 'B';
@B::ISA = 'C';
@@ -167,3 +172,16 @@ test(defined(@{"unknown_package::ISA"}) ? "defined" : "undefined", "undefined");
test(do { eval 'A2::foo()'; $@ ? 1 : 0}, 1);
test(A2->foo(), "foo");
}
+
+{
+ test(do { use Config; eval 'Config->foo()';
+ $@ =~ /^\QCan't locate object method "foo" via package "Config" at/ ? 1 : $@}, 1);
+ test(do { use Config; eval '$d = bless {}, "Config"; $d->foo()';
+ $@ =~ /^\QCan't locate object method "foo" via package "Config" at/ ? 1 : $@}, 1);
+}
+
+test(do { eval 'E->foo()';
+ $@ =~ /^\QCan't locate object method "foo" via package "E" (perhaps / ? 1 : $@}, 1);
+test(do { eval '$e = bless {}, "E"; $e->foo()';
+ $@ =~ /^\QCan't locate object method "foo" via package "E" (perhaps / ? 1 : $@}, 1);
+
OpenPOWER on IntegriCloud