Skip to content

Commit

Permalink
Consistently use unresolved matches
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Aug 29, 2024
1 parent e9a0997 commit aca49df
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion lib/Cavil/ReportUtil.pm
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ sub summary_delta ($old, $new) {
}
}
if (@files_with_new_snippets) {
$text .= " New missed snippets in " . (shift @files_with_new_snippets);
$text .= " New unresolved matches in " . (shift @files_with_new_snippets);
if (@files_with_new_snippets) {
my $num = scalar @files_with_new_snippets;
$text .= " and $num " . ($num > 1 ? 'files' : 'file') . ' more';
Expand Down
13 changes: 7 additions & 6 deletions t/report_util.t
Original file line number Diff line number Diff line change
Expand Up @@ -495,7 +495,8 @@ subtest 'summary_delta' => sub {
licenses => {}
}
),
"Diff to closest match 1:\n\n New missed snippets in Mojolicious-7.25/LICENSE\n\n", 'new file with snippets';
"Diff to closest match 1:\n\n New unresolved matches in Mojolicious-7.25/LICENSE\n\n",
'new file with snippets';
is summary_delta(
{
id => 1,
Expand All @@ -516,7 +517,7 @@ subtest 'summary_delta' => sub {
licenses => {}
}
),
"Diff to closest match 1:\n\n New missed snippets in Mojolicious-7.25/COPYING\n\n",
"Diff to closest match 1:\n\n New unresolved matches in Mojolicious-7.25/COPYING\n\n",
'different file with snippets';
is summary_delta(
{
Expand All @@ -538,7 +539,7 @@ subtest 'summary_delta' => sub {
licenses => {}
}
),
"Diff to closest match 1:\n\n New missed snippets in Mojolicious-7.25/README\n\n",
"Diff to closest match 1:\n\n New unresolved matches in Mojolicious-7.25/README\n\n",
'different snippets in same files';
is summary_delta(
{
Expand All @@ -563,7 +564,7 @@ subtest 'summary_delta' => sub {
licenses => {}
}
),
"Diff to closest match 1:\n\n New missed snippets in Mojolicious-7.25/LEGAL\n\n",
"Diff to closest match 1:\n\n New unresolved matches in Mojolicious-7.25/LEGAL\n\n",
'additional snippets in same files';
is summary_delta(
{
Expand All @@ -584,7 +585,7 @@ subtest 'summary_delta' => sub {
licenses => {}
}
),
"Diff to closest match 1:\n\n New missed snippets in Mojolicious-7.25/COPYING and 1 file more\n\n",
"Diff to closest match 1:\n\n New unresolved matches in Mojolicious-7.25/COPYING and 1 file more\n\n",
'two new files';
is summary_delta(
{
Expand All @@ -606,7 +607,7 @@ subtest 'summary_delta' => sub {
licenses => {}
}
),
"Diff to closest match 1:\n\n New missed snippets in Mojolicious-7.25/COPYING and 2 files more\n\n",
"Diff to closest match 1:\n\n New unresolved matches in Mojolicious-7.25/COPYING and 2 files more\n\n",
'three new files';
};
};
Expand Down

0 comments on commit aca49df

Please sign in to comment.