Attached a patch to change every "use Test::More 'no_test';" to "use Test::More; ... done_testing;"
With this patch every major release since 5.14 works as expected!
One important thing: To easy test this, you can't use "prove -MVariable::Magic -Ilib t/"! Yeah, correct guessed: prove use require to provide -M ;)
Use the following snippet:
prove --exec 'perl -MVariable::Magic -Ilib' t/
diff --git a/t/anon.t b/t/anon.t
index 6ce011b..412ecca 100755
--- a/t/anon.t
+++ b/t/anon.t
@@ -1,7 +1,7 @@
use strict;
use warnings;
-use Test::More 'no_plan';
+use Test::More;
{
package Stuff;
@@ -19,3 +19,6 @@ use Test::More 'no_plan';
is( Stuff->$method("foo"), "foo" );
}
+
+done_testing;
+
diff --git a/t/caller.t b/t/caller.t
index f17bc62..758ddb1 100755
--- a/t/caller.t
+++ b/t/caller.t
@@ -3,7 +3,7 @@
{
package Foo;
- use Test::More 'no_plan';
+ use Test::More;
use Dios;
diff --git a/t/default_on_missing.t b/t/default_on_missing.t
index 2ade3d9..79e897c 100755
--- a/t/default_on_missing.t
+++ b/t/default_on_missing.t
@@ -1,7 +1,7 @@
use strict;
use warnings;
-use Test::More 'no_plan';
+use Test::More;
{
package Stuff;
@@ -84,3 +84,6 @@ SKIP: {
is( Bar->code(42), 44 );
}
+
+done_testing;
+
diff --git a/t/invocant.t b/t/invocant.t
index 39deffc..c84c23c 100755
--- a/t/invocant.t
+++ b/t/invocant.t
@@ -4,7 +4,7 @@ use strict;
use warnings;
use Dios;
-use Test::More 'no_plan';
+use Test::More;
class Stuff {
use Test::More;
@@ -65,3 +65,6 @@ is( $stuff->no_invocant_class_type(Foo::Bar->new), 'Foo::Bar' );
is( $stuff->no_invocant_named_param(arg => Foo->new), 'Foo' );
is( $stuff->no_invocant_return(), 0 );
is( $stuff->no_invocant_named_return(), 0 );
+
+done_testing;
+
diff --git a/t/method.t b/t/method.t
index 1be063f..28a9911 100755
--- a/t/method.t
+++ b/t/method.t
@@ -1,5 +1,5 @@
use strict;
-use Test::More 'no_plan';
+use Test::More;
{
package Foo;
@@ -69,3 +69,6 @@ is_deeply [$obj->caller], [__PACKAGE__, $0, __LINE__], 'caller works';
is $obj->warn, "Testing warn at $0 line 42.\n";
is eval { $obj->strict }, 42;
+
+done_testing;
+
diff --git a/t/named_refs.t b/t/named_refs.t
index 6c9d017..7dbe433 100755
--- a/t/named_refs.t
+++ b/t/named_refs.t
@@ -5,10 +5,6 @@ use lib 't/lib';
use Test::More;
-BEGIN {
- plan 'no_plan';
-}
-
# Test a basic alias.
{
package Foo;
@@ -77,4 +73,5 @@ BEGIN {
::is_deeply [$closure2->()], [4,5,6];
}
+done_testing;
diff --git a/t/odd_number.t b/t/odd_number.t
index d9d9aed..3e235ab 100755
--- a/t/odd_number.t
+++ b/t/odd_number.t
@@ -1,7 +1,7 @@
package Foo;
use strict;
-use Test::More 'no_plan';
+use Test::More;
use Dios;
@@ -11,3 +11,6 @@ method foo(:$name, :$value) {
ok !eval{ Foo->foo(name => 42, value =>); } => 'Missing named argument value';
like $@, qr{No argument found for named parameter \:\$value} => 'Correct exception';
+
+done_testing;
+
diff --git a/t/paren_on_own_line.t b/t/paren_on_own_line.t
index 469dd40..d83cca0 100755
--- a/t/paren_on_own_line.t
+++ b/t/paren_on_own_line.t
@@ -4,7 +4,7 @@ use strict;
use warnings;
use Dios;
-use Test::More 'no_plan';
+use Test::More;
method foo(
$arg
@@ -15,3 +15,6 @@ method foo(
is $@, '';
is( Foo->foo(42), 42 );
+
+done_testing;
+
diff --git a/t/paren_plus_open_block.t b/t/paren_plus_open_block.t
index 9774917..ec05d4a 100755
--- a/t/paren_plus_open_block.t
+++ b/t/paren_plus_open_block.t
@@ -3,7 +3,7 @@ use warnings;
package Foo;
-use Test::More "no_plan";
+use Test::More;
use Dios;
method foo(
@@ -14,3 +14,6 @@ method foo(
}
is( Foo->foo(23), 23 );
+
+done_testing;
+
diff --git a/t/perl_attrs.t b/t/perl_attrs.t
index 2e6c560..353272b 100755
--- a/t/perl_attrs.t
+++ b/t/perl_attrs.t
@@ -2,7 +2,7 @@ use 5.014;
use strict;
use warnings;
-use Test::More 'no_plan';
+use Test::More;
use attributes;
@@ -49,3 +49,6 @@ use attributes;
::ok($cb_called, 'attribute handler got called');
::is_deeply($attrs, [qw/Bar Moo(:Ko{oh) Baz(fu{bar:)/], '... with the right attributes');
}
+
+done_testing;
+
diff --git a/t/refs.t b/t/refs.t
index 0ccb0ce..c5652f3 100755
--- a/t/refs.t
+++ b/t/refs.t
@@ -5,10 +5,6 @@ use lib 't/lib';
use Test::More;
-BEGIN {
- plan 'no_plan';
-}
-
# Test a basic alias.
{
package Foo;
@@ -80,3 +76,5 @@ BEGIN {
::is_deeply [$closure2->()], [4,5,6];
}
+done_testing;
+