p4raw-id: //depot/perl@32104
ext/Safe/t/safe2.t See if Safe works
ext/Safe/t/safe3.t See if Safe works
ext/Safe/t/safeops.t Tests that all ops can be trapped by Safe
+ext/Safe/t/safeuniversal.t Tests Safe with functions from universal.c
ext/SDBM_File/Makefile.PL SDBM extension makefile writer
ext/SDBM_File/sdbm/biblio SDBM kit
ext/SDBM_File/sdbm/CHANGES SDBM kit
--- /dev/null
+#!perl
+
+BEGIN {
+ if($ENV{PERL_CORE}) {
+ chdir 't' if -d 't';
+ @INC = '../lib';
+ }
+ require Config;
+ import Config;
+ if ($Config{'extensions'} !~ /\bOpcode\b/) {
+ print "1..0\n";
+ exit 0;
+ }
+}
+
+use strict;
+use Test::More;
+use Safe;
+plan(tests => 2);
+
+my $c = new Safe;
+
+my $r = $c->reval(q!
+ sub UNIVERSAL::isa { "pwned" }
+ (bless[],"Foo")->isa("Foo");
+!);
+
+is( $r, "pwned", "isa overriden in compartment" );
+is( (bless[],"Foo")->isa("Foo"), 1, "... but not outside" );