Skip to content

Commit

Permalink
Use Test::More first, fixes too many test errors
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
michael-stevens committed Jan 3, 2025
1 parent 61b63d6 commit c8a7610
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion t/01-detect.t
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion t/04-random-order.t
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion t/99-warnings.t
Original file line number Diff line number Diff line change
Expand Up @@ -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' );

Expand Down

0 comments on commit c8a7610

Please sign in to comment.