Dancer-SearchApp
view release on metacpan or search on metacpan
t/003-htmlsnippet.t view on Meta::CPAN
#plan tests => 'no_plan';
for my $test (
['t/htmlsnippet.html',8],
['t/htmlsnippet-ical.html',1],
) {
my($fn,$entries) = @$test;
diag $fn;
# Sluurp
my $html = do { local(@ARGV,$/) = ($fn); <> };
my @snippets = Dancer::SearchApp::HTMLSnippet->extract_highlights(
html => $html,
max_length => 150,
);
is 0+@snippets, $entries, "We get the expected number of snippets back";
# All snippets should contain a matching number of em / /em tags
my @unmatched;
( run in 0.479 second using v1.01-cache-2.11-cpan-49f99fa48dc )