Make tests pass with Carp 1.25
[gitmo/Package-DeprecationManager.git] / t / basic.t
index 0d8ecc0..20e6e5d 100644 (file)
--- a/t/basic.t
+++ b/t/basic.t
@@ -9,12 +9,14 @@ use Test::Requires {
 };
 
 {
-    like exception {
-        eval 'package Foo; use Package::DeprecationManager;';
-        die $@ if $@;
-    },
-    qr/^\QYou must provide a hash reference -deprecations parameter when importing Package::DeprecationManager/,
-        'must provide a set of deprecations when using Package::DeprecationManager';
+    like(
+        exception {
+            eval 'package Foo; use Package::DeprecationManager;';
+            die $@ if $@;
+        },
+        qr/^\QYou must provide a hash reference -deprecations parameter when importing Package::DeprecationManager/,
+        'must provide a set of deprecations when using Package::DeprecationManager'
+    );
 }
 
 {
@@ -185,7 +187,7 @@ use Test::Requires {
     package My::Baz;
 
     ::stderr_like{ My::Package2::foo() }
-        qr/^foo is deprecated at t.basic\.t line \d+\s+My::Baz/,
+        qr/^foo is deprecated at t.basic\.t line \d+\.?\s+My::Baz/,
         'deprecation warning for call to My::Package2::foo() and mentions My::Baz but not My::Package[12]';
 
     ::stderr_is{ My::Package2::foo() }
@@ -197,7 +199,7 @@ use Test::Requires {
         'no deprecation warning for call to My::Package1::foo()';
 
     ::stderr_like{ My::Package2::bar() }
-        qr/^bar is deprecated at t.basic\.t line \d+\s+My::Baz/,
+        qr/^bar is deprecated at t.basic\.t line \d+\.?\s+My::Baz/,
         'deprecation warning for call to My::Package2::foo() and mentions My::Baz but not My::Package[12]';
 
     ::stderr_is{ My::Package2::bar() }
@@ -209,7 +211,7 @@ use Test::Requires {
     package My::Quux;
 
     ::stderr_like{ My::Package1::foo() }
-        qr/^foo is deprecated at t.basic\.t line \d+\s+My::Quux/,
+        qr/^foo is deprecated at t.basic\.t line \d+\.?\s+My::Quux/,
         'deprecation warning for call to My::Package1::foo() and mentions My::Quux but not My::Package[12]';
 
     ::stderr_is{ My::Package1::foo() }