summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2011-12-10 16:00:09 -0600
committerJesse Luehrs <doy@tozt.net>2011-12-10 16:02:22 -0600
commit672ffdba4da7d100f0377139c087ea63c0f24ecd (patch)
tree91c8725de06a2fc4e6ff2a9a708c05d5cc7944b8
parentfe08abc6ffcbbc3f827fe53ed99c9868e2d2bc7b (diff)
downloadpackage-stash-xs-672ffdba4da7d100f0377139c087ea63c0f24ecd.tar.gz
package-stash-xs-672ffdba4da7d100f0377139c087ea63c0f24ecd.zip
here's that test failure
-rw-r--r--t/isa.t35
1 files changed, 31 insertions, 4 deletions
diff --git a/t/isa.t b/t/isa.t
index ce852a6..f2e516f 100644
--- a/t/isa.t
+++ b/t/isa.t
@@ -12,11 +12,38 @@ use Package::Stash;
{
package Bar;
+ sub bar { }
}
-my $stash = Package::Stash->new('Foo');
-my @ISA = ('Bar');
-@{$stash->get_or_add_symbol('@ISA')} = @ISA;
-isa_ok('Foo', 'Bar');
+{
+ my $stash = Package::Stash->new('Foo');
+ my @ISA = ('Bar');
+ @{$stash->get_or_add_symbol('@ISA')} = @ISA;
+ isa_ok('Foo', 'Bar');
+ isa_ok(bless({}, 'Foo'), 'Bar');
+}
+
+{
+ package Baz;
+ sub foo { }
+}
+
+{
+ my $stash = Package::Stash->new('Quux');
+ {
+ my $isa = $stash->get_or_add_symbol('@ISA');
+ @$isa = ('Baz');
+ isa_ok('Quux', 'Baz');
+ isa_ok(bless({}, 'Quux'), 'Baz');
+ ok(Quux->can('foo'));
+ }
+ {
+ my $isa = $stash->get_or_add_symbol('@ISA');
+ @$isa = ('Bar');
+ isa_ok('Quux', 'Bar');
+ isa_ok(bless({}, 'Quux'), 'Bar');
+ ok(Quux->can('bar'));
+ }
+}
done_testing;