Use subtest to group related tests

This reduces the output of `make check`, making it easier to zero in
on results of interest.
This commit is contained in:
Richard Hansen 2020-07-05 16:39:42 -04:00
parent 94aaff67cd
commit 199e9125a4

View file

@ -48,8 +48,10 @@ my @test_cases = (
for my $tc (@test_cases) { for my $tc (@test_cases) {
my ($got_rest, %got_vars) = ddclient::parse_assignments($tc->{input}); my ($got_rest, %got_vars) = ddclient::parse_assignments($tc->{input});
is(Dumper(\%got_vars), Dumper($tc->{want_vars}), "$tc->{name}: vars"); subtest $tc->{name} => sub {
is($got_rest, $tc->{want_rest}, "$tc->{name}: rest"); is(Dumper(\%got_vars), Dumper($tc->{want_vars}), "vars");
is($got_rest, $tc->{want_rest}, "rest");
}
} }
done_testing(); done_testing();