Skip to content

Commit

Permalink
don't use Test::Deep for test requiring Tools
Browse files Browse the repository at this point in the history
They both export automatically functions named 'any' and 'all',
triggering an ugly warning.
  • Loading branch information
guillomovitch committed Dec 24, 2012
1 parent 2003dda commit 922bb0c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 10 deletions.
3 changes: 1 addition & 2 deletions t/inventory/generic/screen.t
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ use strict;
use warnings;

use English qw(-no_match_vars);
use Test::Deep;
use Test::More;
use UNIVERSAL::require;

Expand Down Expand Up @@ -389,5 +388,5 @@ foreach my $test (sort keys %edid_tests) {
my $file = "resources/generic/edid/$test";
my $edid = getAllLines(file => $file);
my $info = FusionInventory::Agent::Task::Inventory::Input::Generic::Screen::_getEdidInfo(edid => $edid, datadir => './share');
cmp_deeply($info, $edid_tests{$test}, $test);
is_deeply($info, $edid_tests{$test}, $test);
}
9 changes: 4 additions & 5 deletions t/tools.t
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ use warnings;
use lib 't';

use File::Temp;
use Test::Deep;
use Test::More;

use FusionInventory::Agent::Tools;
Expand Down Expand Up @@ -250,7 +249,7 @@ is(
3,
"lines count, command reading"
);
cmp_deeply(
is_deeply(
[ getAllLines(file => $tmp) ],
[ qw/foo bar baz/ ],
"all lines, file reading, list context"
Expand All @@ -260,7 +259,7 @@ is(
"foo\nbar\nbaz\n",
"all lines, file reading, scalar context"
);
cmp_deeply(
is_deeply(
[ getAllLines(command => 'perl -e "print qq{foo\nbar\nbaz\n}"') ],
[ qw/foo bar baz/ ],
"all lines, command reading, list context"
Expand All @@ -270,7 +269,7 @@ is(
"foo\nbar\nbaz\n",
"all lines, command reading, scalar context"
);
cmp_deeply(
is_deeply(
[ getFirstMatch(file => $tmp, pattern => qr/^(b\w+)$/) ],
[ qw/bar/ ],
"first match, file reading, list context"
Expand All @@ -280,7 +279,7 @@ is(
'bar',
"first match, file reading, scalar context"
);
cmp_deeply(
is_deeply(
[ getFirstMatch(command => 'perl -e "print qq{foo\nbar\nbaz\n}"', pattern => qr/^(b\w+)$/) ],
[ qw/bar/ ],
"first match, command reading, list context"
Expand Down
5 changes: 2 additions & 3 deletions t/xml/response.t
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ use strict;
use warnings;

use English qw(-no_match_vars);
use Test::Deep;
use Test::Exception;
use Test::More;

Expand Down Expand Up @@ -200,13 +199,13 @@ foreach my $test (keys %tests) {
);

my $content = $message->getContent();
cmp_deeply($content, $tests{$test}, $test);
is_deeply($content, $tests{$test}, $test);

subtest 'options' => sub {
my $options = $content->{OPTION};
plan tests => scalar @$options;
foreach my $option (@$options) {
cmp_deeply(
is_deeply(
$message->getOptionsInfoByName($option->{NAME}),
$option,
"$test option $option->{NAME}"
Expand Down

0 comments on commit 922bb0c

Please sign in to comment.