[Orca-checkins] r486 - orca/trunk/packages/Storable-2.15/t

blair at orcaware.com blair at orcaware.com
Thu Sep 8 20:28:46 PDT 2005


Author: blair at orcaware.com
Date: Thu Sep  8 20:27:49 2005
New Revision: 486

Added:
   orca/trunk/packages/Storable-2.15/t/sig_die.t

Log:
Add a file inadvertently not included Storable was upgraded to version
2.15.

* packages/Storable-2.15/t/sig_die.t:
  New file from Storable 2.15's tarball.


Added: orca/trunk/packages/Storable-2.15/t/sig_die.t
==============================================================================
--- (empty file)
+++ orca/trunk/packages/Storable-2.15/t/sig_die.t	Thu Sep  8 20:27:49 2005
@@ -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");



More information about the Orca-checkins mailing list