use strict;
use warnings;
-use Test::More;
use Test::Fatal;
+use Test::More 0.88;
use Test::Requires {
'Test::Output' => '0.16',
};
{
- 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'
+ );
}
{
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() }
'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() }
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() }