Branch Coverage

blib/lib/WWW/Search/Test.pm
Criterion Covered Total %
branch 4 154 2.6


line true false branch
73 1 1 unless ($WWW::Search::Test::websearch)
95 1 0 if $WWW::Search::Test::websearch
99 0 1 unless $WWW::Search::Test::websearch =~ /WebSearch/
149 0 0 if ($new_mode)
166 0 0 if $self->{'engines'} eq ',,'
184 0 0 unless $self->relevant_test($sSE)
189 0 0 unless ($code ne '')
203 0 0 if $@
235 0 0 if $self->{'debug'}
240 0 0 if ($test_method == $WWW::Search::Test::TEST_GREATER_THAN)
245 0 0 if (0 < $high_end)
249 0 0 unless $self->relevant_test($sSE)
251 0 0 if ($self->{'mode'} eq $WWW::Search::Test::MODE_INTERNAL and $query =~ /$WWW::Search::Test::bogus_query/)
261 0 0 if ($self->{'mode'} eq $WWW::Search::Test::MODE_UPDATE)
267 0 0 if $afile =~ /^$file/
274 0 0 if ($d eq '')
282 0 0 if $self->{'debug'}
293 0 0 $self->{'debug'} ? :
295 0 0 if $self->{'verbose'} or $self->{'debug'}
296 0 0 unless open TRIALSTREAM, "$cmd|"
297 0 0 unless open TRIALFILE, ">$file.trial"
298 0 0 if $self->{'mode'} eq $WWW::Search::Test::MODE_UPDATE
304 0 0 if $self->{'mode'} eq $WWW::Search::Test::MODE_UPDATE
308 0 0 if ($self->{'mode'} eq $WWW::Search::Test::MODE_UPDATE)
311 0 0 if (open TS, ">$file.README")
322 0 0 if (-f "$file.out") { }
325 0 0 if ($test_method == $WWW::Search::Test::TEST_GREATER_THAN) { }
0 0 elsif ($test_method == $WWW::Search::Test::TEST_RANGE) { }
0 0 elsif ($test_method == $WWW::Search::Test::TEST_EXACTLY) { }
0 0 elsif ($test_method == $WWW::Search::Test::TEST_BY_COUNTING) { }
327 0 0 if ($iActual <= $low_end)
335 0 0 unless defined $low_end
336 0 0 unless defined $high_end
337 0 0 unless 0 < $high_end
338 0 0 if ($iActual < $low_end)
343 0 0 if ($high_end < $iActual)
351 0 0 &diff("$file.out", "$file.trial") ? :
357 0 0 if ($iActual != $iExpected)
369 0 0 if ($e == 0) { }
0 0 elsif ($e == 1) { }
403 0 0 unless $self->relevant_test($engine)
423 0 0 unless $self->relevant_test($engine)
445 0 0 unless $self->relevant_test($engine)
467 0 0 unless $self->relevant_test($engine)
502 0 0 unless open WC, shift()
507 0 0 if /Nothing found./
524 0 0 unless open DIFF1, shift()
525 0 0 unless open DIFF2, shift()
532 0 0 unless (defined $s2)
539 0 0 if ($s1 ne $s2)
571 0 0 ref $WWW::Search::Test::oSearch ? :
655 0 0 unless &Test::More::is(scalar $WWW::Search::Test::oSearch->response->code, 200, 'got valid HTTP response')
656 0 0 if (defined $iMin)
658 0 0 unless &Test::More::cmp_ok($iMin, '<=', $iCount, "lower-bound num-hits for query=$sQuery")
660 0 0 if ($iApprox)
662 0 0 unless &Test::More::cmp_ok($iMin, '<=', scalar $WWW::Search::Test::oSearch->approximate_result_count, 'lower-bound approximate_result_count')
666 0 0 if (defined $iMax)
668 0 0 unless &Test::More::cmp_ok($iCount, '<=', $iMax, "upper-bound num-hits for query=$sQuery")
670 0 0 if ($iApprox)
672 0 0 unless &Test::More::cmp_ok(scalar $WWW::Search::Test::oSearch->approximate_result_count, '<=', $iMax, 'upper-bound approximate_result_count')
677 0 0 if ($iAnyFailure and $WWW::Search::Test::sSaveOnError ne '')
710 0 0 if defined $iMin and defined $iMax and $iMax < $iMin
716 0 0 if (not defined $iMax) { }
730 0 0 unless $iDoNotEscape
732 0 0 if ($sType eq 'gui') { }
742 0 0 if ($iPrintResults)
750 0 0 if defined $oResult->$sField
763 0 0 if (not defined $iMax) { }
0 0 elsif (not defined $iMin) { }
775 0 0 unless defined $iMax
776 0 0 if ($iResults < $iMin or $iMax < $iResults)
828 0 0 if ($sCmp eq 'like') { }
0 0 elsif ($sCmp eq 'unlike') { }
0 0 elsif ($sCmp eq 'date') { }
863 0 0 unless (eval $sCodeAll)
869 0 0 if ($iV < $iVall)
889 0 0 if ($iAnyFailed)