summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2010-10-30 05:46:47 -0700
committerFather Chrysostomos <sprout@cpan.org>2010-10-30 06:52:38 -0700
commit149314244dcca36804a9815561d32625351d81c6 (patch)
tree3207e8d79482c963007109fd4da00b355a400d9b
parentdff7d458d1908c480f5e02c7a7de6e1e157b0e65 (diff)
downloadperl-149314244dcca36804a9815561d32625351d81c6.tar.gz
To-do tests for isarev (more to come)
-rw-r--r--MANIFEST1
-rw-r--r--t/mro/isarev.t35
2 files changed, 36 insertions, 0 deletions
diff --git a/MANIFEST b/MANIFEST
index ec0b60cf45..8c870779e1 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -4550,6 +4550,7 @@ t/mro/dbic_dfs.t mro tests
t/mro/inconsistent_c3.t mro tests
t/mro/isa_c3.t test for optimisatised mro_get_linear_isa_c3
t/mro/isa_dfs.t test for optimisatised mro_get_linear_isa_dfs
+t/mro/isarev.t PL_isarev/mro::get_isarev tests
t/mro/method_caching.t mro tests
t/mro/next_edgecases.t mro tests
t/mro/next_goto.t mro tests
diff --git a/t/mro/isarev.t b/t/mro/isarev.t
new file mode 100644
index 0000000000..f93c0466e5
--- /dev/null
+++ b/t/mro/isarev.t
@@ -0,0 +1,35 @@
+#!./perl
+
+BEGIN {
+ unless (-d 'blib') {
+ chdir 't' if -d 't';
+ @INC = '../lib';
+ }
+ require q(./test.pl);
+}
+
+use strict;
+use warnings;
+plan(tests => 3);
+
+use mro;
+
+sub i {
+ @_ = @_;
+ $_[0] = "@{mro::get_isarev $_[0]}";
+ $_[1] = "@{$_[1]}";
+ goto &is;
+}
+
+$::TODO = "[perl #75176] isarev leeks (and onions)";
+
+@Huskey::ISA = "Dog";
+@Dog::ISA = "Canid";
+@Some::Brand::Name::ISA = "Dog::Bone";
+@Dog::Bone::ISA = "Treat";
+@MyCollar::ISA = "Dog::Collar::Leather";
+@Dog::Collar::Leather::ISA = "Collar";
+delete $::{"Dog::"};
+i Canid=>[], "deleting a stash elem removes isarev entries";
+i Treat=>[], "deleting a nested stash elem removes isarev entries";
+i Collar=>[], "deleting a doubly nested stash elem removes isarev entries";