r64618 - in /branches/upstream/libtest-fatal-perl/current: Changes META.json META.yml Makefile.PL README lib/Test/Fatal.pm t/basic.t

ansgar at users.alioth.debian.org ansgar at users.alioth.debian.org
Sat Nov 6 14:22:21 UTC 2010


Author: ansgar
Date: Sat Nov  6 14:17:39 2010
New Revision: 64618

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=64618
Log:
[svn-upgrade] new version libtest-fatal-perl (0.003)

Modified:
    branches/upstream/libtest-fatal-perl/current/Changes
    branches/upstream/libtest-fatal-perl/current/META.json
    branches/upstream/libtest-fatal-perl/current/META.yml
    branches/upstream/libtest-fatal-perl/current/Makefile.PL
    branches/upstream/libtest-fatal-perl/current/README
    branches/upstream/libtest-fatal-perl/current/lib/Test/Fatal.pm
    branches/upstream/libtest-fatal-perl/current/t/basic.t

Modified: branches/upstream/libtest-fatal-perl/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libtest-fatal-perl/current/Changes?rev=64618&op=diff
==============================================================================
--- branches/upstream/libtest-fatal-perl/current/Changes (original)
+++ branches/upstream/libtest-fatal-perl/current/Changes Sat Nov  6 14:17:39 2010
@@ -1,4 +1,11 @@
 Revision history for Test-Fatal
+
+0.003     2010-10-28 22:10:59 America/New_York
+          more tests for false exceptions, especially on 5.13
+
+0.002     2010-10-28 00:11:09 America/New_York
+          add tests for handling of false exceptions
+          fix precedence error in documentation (thanks, ether)
 
 0.001     2010-10-24 00:23:24 America/New_York
           first release

Modified: branches/upstream/libtest-fatal-perl/current/META.json
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libtest-fatal-perl/current/META.json?rev=64618&op=diff
==============================================================================
--- branches/upstream/libtest-fatal-perl/current/META.json (original)
+++ branches/upstream/libtest-fatal-perl/current/META.json Sat Nov  6 14:17:39 2010
@@ -28,7 +28,8 @@
       },
       "test" : {
          "requires" : {
-            "Test::More" : "0.96"
+            "Test::More" : "0.96",
+            "overload" : 0
          }
       }
    },
@@ -39,7 +40,7 @@
          "url" : "git://git.codesimply.com/Test-Fatal.git"
       }
    },
-   "version" : "0.001",
+   "version" : "0.003",
    "x_Dist_Zilla" : {
       "plugins" : [
          {

Modified: branches/upstream/libtest-fatal-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libtest-fatal-perl/current/META.yml?rev=64618&op=diff
==============================================================================
--- branches/upstream/libtest-fatal-perl/current/META.yml (original)
+++ branches/upstream/libtest-fatal-perl/current/META.yml Sat Nov  6 14:17:39 2010
@@ -4,6 +4,7 @@
   - 'Ricardo Signes <rjbs at cpan.org>'
 build_requires:
   Test::More: 0.96
+  overload: 0
 configure_requires:
   ExtUtils::MakeMaker: 6.31
 dynamic_config: 0
@@ -19,7 +20,7 @@
   Try::Tiny: 0.07
 resources:
   repository: git://git.codesimply.com/Test-Fatal.git
-version: 0.001
+version: 0.003
 x_Dist_Zilla:
   plugins:
     -

Modified: branches/upstream/libtest-fatal-perl/current/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libtest-fatal-perl/current/Makefile.PL?rev=64618&op=diff
==============================================================================
--- branches/upstream/libtest-fatal-perl/current/Makefile.PL (original)
+++ branches/upstream/libtest-fatal-perl/current/Makefile.PL Sat Nov  6 14:17:39 2010
@@ -12,7 +12,8 @@
   'ABSTRACT' => 'incredibly simple helpers for testing code with exceptions',
   'AUTHOR' => 'Ricardo Signes <rjbs at cpan.org>',
   'BUILD_REQUIRES' => {
-    'Test::More' => '0.96'
+    'Test::More' => '0.96',
+    'overload' => '0'
   },
   'CONFIGURE_REQUIRES' => {
     'ExtUtils::MakeMaker' => '6.31'
@@ -26,7 +27,7 @@
     'Exporter' => '5.59',
     'Try::Tiny' => '0.07'
   },
-  'VERSION' => '0.001',
+  'VERSION' => '0.003',
   'test' => {
     'TESTS' => 't/*.t'
   }

Modified: branches/upstream/libtest-fatal-perl/current/README
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libtest-fatal-perl/current/README?rev=64618&op=diff
==============================================================================
--- branches/upstream/libtest-fatal-perl/current/README (original)
+++ branches/upstream/libtest-fatal-perl/current/README Sat Nov  6 14:17:39 2010
@@ -1,7 +1,7 @@
 
 
 This archive contains the distribution Test-Fatal,
-version 0.001:
+version 0.003:
 
   incredibly simple helpers for testing code with exceptions
 

Modified: branches/upstream/libtest-fatal-perl/current/lib/Test/Fatal.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libtest-fatal-perl/current/lib/Test/Fatal.pm?rev=64618&op=diff
==============================================================================
--- branches/upstream/libtest-fatal-perl/current/lib/Test/Fatal.pm (original)
+++ branches/upstream/libtest-fatal-perl/current/lib/Test/Fatal.pm Sat Nov  6 14:17:39 2010
@@ -2,7 +2,7 @@
 use warnings;
 package Test::Fatal;
 BEGIN {
-  $Test::Fatal::VERSION = '0.001';
+  $Test::Fatal::VERSION = '0.003';
 }
 # ABSTRACT: incredibly simple helpers for testing code with exceptions
 
@@ -50,7 +50,7 @@
 
 =head1 VERSION
 
-version 0.001
+version 0.003
 
 =head1 SYNOPSIS
 
@@ -59,13 +59,15 @@
 
   use System::Under::Test qw(might_die);
 
-  ok(
-    not exception { might_die; },
+  is(
+    exception { might_die; },
+    undef
     "the code lived",
   );
 
-  ok(
+  isnt(
     exception { might_die; },
+    undef,
     "the code died",
   );
 

Modified: branches/upstream/libtest-fatal-perl/current/t/basic.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libtest-fatal-perl/current/t/basic.t?rev=64618&op=diff
==============================================================================
--- branches/upstream/libtest-fatal-perl/current/t/basic.t (original)
+++ branches/upstream/libtest-fatal-perl/current/t/basic.t Sat Nov  6 14:17:39 2010
@@ -1,6 +1,6 @@
 use strict;
 use warnings;
-use Test::More tests => 4;
+use Test::More tests => 5 + ($] >= 5.013001 ? 0 : 1);
 use Test::Fatal qw(exception success);
 use Try::Tiny 0.07;
 
@@ -14,9 +14,6 @@
   ! exception { 1 },
   "no fatality means no exception",
 );
-
-# TODO: test for fatality of undef exception
-# TODO: test for fatality of false exception
 
 try {
   die "die";
@@ -33,3 +30,32 @@
 } success {
   pass("a success block runs, passing");
 };
+
+# TODO: test for fatality of undef exception?
+
+{
+  package BreakException;
+  sub DESTROY { eval { my $x = 'o no'; } }
+}
+
+if ($] <= 5.013001) {
+  like(
+    exception { exception {
+      my $blackguard = bless {}, 'BreakException';
+      die "real exception";
+    } },
+    qr{false exception},
+    "we throw a new exception if the exception is false",
+  );
+}
+
+{
+  package FalseObject;
+  use overload 'bool' => sub { return };
+}
+
+like(
+  exception { exception { die(bless {} => 'FalseObject'); } },
+  qr{false exception},
+  "we throw a new exception if the exception is false",
+);




More information about the Pkg-perl-cvs-commits mailing list