From c8a7610fe006af3cdbb13b274fbbbfbd7c909d8b Mon Sep 17 00:00:00 2001 From: Michael Stevens Date: Fri, 3 Jan 2025 15:12:47 +0000 Subject: [PATCH] Use Test::More first, fixes too many test errors Prior to change saw test failures looking like this: t/99-warnings.t ...... 1/? # Looks like you planned 2 tests but ran 3. t/99-warnings.t ...... Dubious, test returned 255 (wstat 65280, 0xff00) on perl 5.34.0 on ubuntu. --- t/01-detect.t | 3 ++- t/04-random-order.t | 2 +- t/99-warnings.t | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/t/01-detect.t b/t/01-detect.t index 5831d78..4fb9e9b 100644 --- a/t/01-detect.t +++ b/t/01-detect.t @@ -8,9 +8,10 @@ use JSON::PP (); use List::Util 1.49 qw( uniq ); use Path::Tiny qw( path ); use Test::Differences qw( eq_or_diff ); -use Test::Warnings; use Test::More import => [qw( cmp_ok diag done_testing is is_deeply ok subtest )]; +use Test::Warnings; + # test that the module loads without errors my $w; diff --git a/t/04-random-order.t b/t/04-random-order.t index f32bb1d..97c2235 100644 --- a/t/04-random-order.t +++ b/t/04-random-order.t @@ -6,8 +6,8 @@ use warnings; use FindBin (); use JSON::PP (); use Path::Tiny qw( path ); -use Test::Warnings; use Test::More import => [qw( cmp_ok done_testing is_deeply ok subtest )]; +use Test::Warnings; # test that the module loads without errors my $w; diff --git a/t/99-warnings.t b/t/99-warnings.t index 964fbe9..4f1a6d0 100644 --- a/t/99-warnings.t +++ b/t/99-warnings.t @@ -4,8 +4,8 @@ use strict; use warnings; use HTTP::BrowserDetect (); -use Test::Warnings; use Test::More import => [qw( done_testing is ok subtest )]; +use Test::Warnings; ok( my $ua = HTTP::BrowserDetect->new(undef), 'undef produces no warnings' );