From: Abhijit Menon-Sen Date: Fri, 20 May 2005 14:42:21 +0000 (+0000) Subject: Damnable applypatch nonsense. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=e0408fa07b297c876e517b9f7b8993ec4e3d75f3;p=p5sagit%2Fp5-mst-13.2.git Damnable applypatch nonsense. p4raw-id: //depot/perl@24514 --- diff --git a/ext/Storable/t/sig_die.t b/ext/Storable/t/sig_die.t index e69de29..0350752 100644 --- a/ext/Storable/t/sig_die.t +++ b/ext/Storable/t/sig_die.t @@ -0,0 +1,44 @@ +#!./perl +# +# Copyright (c) 2002 Slaven Rezic +# +# You may redistribute only under the same terms as Perl 5, as specified +# in the README file that comes with the distribution. +# + +sub BEGIN { + if ($ENV{PERL_CORE}){ + chdir('t') if -d 't'; + @INC = ('.', '../lib'); + } else { + unshift @INC, 't'; + } + require Config; import Config; + if ($ENV{PERL_CORE} and $Config{'extensions'} !~ /\bStorable\b/) { + print "1..0 # Skip: Storable was not built\n"; + exit 0; + } +} + +use strict; +BEGIN { + if (!eval q{ + use Test::More; + 1; + }) { + print "1..0 # skip: tests only work with Test::More\n"; + exit; + } +} + +BEGIN { plan tests => 1 } + +my @warns; +$SIG{__WARN__} = sub { push @warns, shift }; +$SIG{__DIE__} = sub { require Carp; warn Carp::longmess(); warn "Evil die!" }; + +require Storable; + +Storable::dclone({foo => "bar"}); + +is(join("", @warns), "", "__DIE__ is not evil here");