summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Rothenberg <rrwo@cpan.org>2020-04-04 10:53:18 +0100
committerRobert Rothenberg <rrwo@cpan.org>2020-04-04 10:53:21 +0100
commit2591b38b45c97010f518984eb3a34e24fb23dd9e (patch)
tree6acab9034ccf8056a1aa248aec898cde83a1bbfd
parent07c5bf33d8a0b0b4dc03d79a85c39e4af443047e (diff)
Use Test::More and Test::Deep to avoid warnings in latest Test::Most
The latest Test::Most is triggering warnings > (in cleanup) (in cleanup) at ... /Test/Most.pm line 290 during > global destruction. While this isn't treated as a failure by Test::Warnings, it is perhaps safer to not use it.
-rw-r--r--Changes3
-rw-r--r--cpanfile2
-rw-r--r--t/01-basic.t3
-rw-r--r--t/02-legacy.t3
-rw-r--r--t/10-getloadavg.t3
-rw-r--r--t/11-proc_loadavg.t3
-rw-r--r--t/12-uptime.t3
-rw-r--r--t/13-w.t3
8 files changed, 16 insertions, 7 deletions
diff --git a/Changes b/Changes
index f182e4e..62b7b9a 100644
--- a/Changes
+++ b/Changes
@@ -4,6 +4,9 @@ Revision history for Perl extension {{$dist->name}}:
[Tests]
- Test for warnings.
+ - Use Test::More and Test::Deep instead of Test::Most,
+ due to global destruction warnings in latest Test::Most.
+
[Documentation]
- Added contributors names in Changes for earlier versions.
diff --git a/cpanfile b/cpanfile
index b54d523..c35f53b 100644
--- a/cpanfile
+++ b/cpanfile
@@ -13,8 +13,8 @@ on 'test' => sub {
requires "File::Spec" => "0";
requires "Module::Metadata" => "0";
requires "Scalar::Util" => "0";
+ requires "Test::Deep" => "0";
requires "Test::More" => "0";
- requires "Test::Most" => "0";
requires "Test::Warnings" => "0";
};
diff --git a/t/01-basic.t b/t/01-basic.t
index 4844e60..24e9f3a 100644
--- a/t/01-basic.t
+++ b/t/01-basic.t
@@ -1,4 +1,5 @@
-use Test::Most;
+use Test::More;
+use Test::Deep;
use Test::Warnings;
use Scalar::Util 'looks_like_number';
diff --git a/t/02-legacy.t b/t/02-legacy.t
index fff5974..52b8020 100644
--- a/t/02-legacy.t
+++ b/t/02-legacy.t
@@ -1,4 +1,5 @@
-use Test::Most;
+use Test::More;
+use Test::Deep;
use Test::Warnings;
use Scalar::Util 'looks_like_number';
diff --git a/t/10-getloadavg.t b/t/10-getloadavg.t
index a6f1b4a..2c9fb4c 100644
--- a/t/10-getloadavg.t
+++ b/t/10-getloadavg.t
@@ -1,4 +1,5 @@
-use Test::Most;
+use Test::More;
+use Test::Deep;
use Test::Warnings;
use Scalar::Util 'looks_like_number';
diff --git a/t/11-proc_loadavg.t b/t/11-proc_loadavg.t
index c1918fd..a70e528 100644
--- a/t/11-proc_loadavg.t
+++ b/t/11-proc_loadavg.t
@@ -1,4 +1,5 @@
-use Test::Most;
+use Test::More;
+use Test::Deep;
use Test::Warnings;
use Scalar::Util 'looks_like_number';
diff --git a/t/12-uptime.t b/t/12-uptime.t
index 5da340c..7289a78 100644
--- a/t/12-uptime.t
+++ b/t/12-uptime.t
@@ -1,4 +1,5 @@
-use Test::Most;
+use Test::More;
+use Test::Deep;
use Test::Warnings;
use File::Which qw/ which /;
diff --git a/t/13-w.t b/t/13-w.t
index 02bc939..fa56b4b 100644
--- a/t/13-w.t
+++ b/t/13-w.t
@@ -1,4 +1,5 @@
-use Test::Most;
+use Test::More;
+use Test::Deep;
use Test::Warnings;
use File::Which qw/ which /;