Change 34853 by [EMAIL PROTECTED] on 2008/11/16 20:09:25
Integrate:
[ 30980]
Subject: Re: new C3 MRO patch
From: "Brandon Black" <[EMAIL PROTECTED]>
Date: Tue, 17 Apr 2007 13:14:36 -0500
Message-ID: <[EMAIL PROTECTED]>
[the t/TEST part]
[ 31018]
Make t/harness find the t/mro tests
[ 34846]
Integrate:
[ 34839]
Subject: MRO tests for isa() and package aliases
From: Torsten Schoenfeld <[EMAIL PROTECTED]>
Date: Sat, 15 Nov 2008 21:24:40 +0100
Message-ID: <[EMAIL PROTECTED]>
Affected files ...
... //depot/maint-5.8/perl/MANIFEST#454 integrate
... //depot/maint-5.8/perl/t/TEST#27 integrate
... //depot/maint-5.8/perl/t/harness#12 integrate
... //depot/maint-5.8/perl/t/mro/package_aliases.t#1 branch
Differences ...
==== //depot/maint-5.8/perl/MANIFEST#454 (text) ====
Index: perl/MANIFEST
--- perl/MANIFEST#453~34686~ 2008-10-31 04:25:35.000000000 -0700
+++ perl/MANIFEST 2008-11-16 12:09:25.000000000 -0800
@@ -3044,6 +3044,7 @@
t/Module_Pluggable/lib/No/Middle.pm Module::Pluggable tests
t/Module_Pluggable/lib/OddTest/Plugin/Foo.pm Module::Pluggable tests
t/Module_Pluggable/lib/TA/C/A/I.pm Module::Pluggable tests
+t/mro/package_aliases.t mro tests
Todo.micro The Wishlist for microperl
toke.c The tokener
t/op/64bitint.t See if 64 bit integers work
==== //depot/maint-5.8/perl/t/TEST#27 (xtext) ====
Index: perl/t/TEST
--- perl/t/TEST#26~33497~ 2008-03-12 11:44:49.000000000 -0700
+++ perl/t/TEST 2008-11-16 12:09:25.000000000 -0800
@@ -106,7 +106,7 @@
}
unless (@ARGV) {
- foreach my $dir (qw(base comp cmd run io op uni)) {
+ foreach my $dir (qw(base comp cmd run io op uni mro)) {
_find_tests($dir);
}
_find_tests("lib") unless $::core;
==== //depot/maint-5.8/perl/t/harness#12 (text) ====
Index: perl/t/harness
--- perl/t/harness#11~34291~ 2008-09-05 23:54:40.000000000 -0700
+++ perl/t/harness 2008-11-16 12:09:25.000000000 -0800
@@ -81,6 +81,7 @@
push @tests, <io/*.t>;
push @tests, <op/*.t>;
push @tests, <uni/*.t>;
+ push @tests, <mro/*.t>;
push @tests, <lib/*.t>;
push @tests, <japh/*.t> if $torture;
push @tests, <win32/*.t> if $^O eq 'MSWin32';
==== //depot/maint-5.8/perl/t/mro/package_aliases.t#1 (text) ====
Index: perl/t/mro/package_aliases.t
--- /dev/null 2008-11-04 07:18:13.288883315 -0800
+++ perl/t/mro/package_aliases.t 2008-11-16 12:09:25.000000000 -0800
@@ -0,0 +1,33 @@
+#!./perl
+
+BEGIN {
+ unless (-d 'blib') {
+ chdir 't' if -d 't';
+ @INC = '../lib';
+ }
+}
+
+use strict;
+use warnings;
+require q(./test.pl); plan(tests => 4);
+
+{
+ package New;
+ use strict;
+ use warnings;
+
+ package Old;
+ use strict;
+ use warnings;
+
+ {
+ no strict 'refs';
+ *{'Old::'} = *{'New::'};
+ }
+}
+
+ok (Old->isa (New::), 'Old inherits from New');
+ok (New->isa (Old::), 'New inherits from Old');
+
+isa_ok (bless ({}, Old::), New::, 'Old object');
+isa_ok (bless ({}, New::), Old::, 'New object');
End of Patch.