Branch Coverage

blib/lib/Zonemaster/Engine/Test/Syntax.pm
Criterion Covered Total %
branch 65 74 87.8


line true false branch
31 3 2 if 'Zonemaster::Engine'->config->should_run('syntax01')
32 2 2 if 'Zonemaster::Engine'->config->should_run('syntax02')
33 2 2 if 'Zonemaster::Engine'->config->should_run('syntax03')
35 2 2 if (&any(sub { $_->tag eq 'ONLY_ALLOWED_CHARS'; } , @results))
40 3 3 if 'Zonemaster::Engine'->config->should_run('syntax04')
43 1 1 if 'Zonemaster::Engine'->config->should_run('syntax05')
45 2 0 if (&none(sub { $_->tag eq 'NO_RESPONSE_SOA_QUERY'; } , @results))
46 1 1 if 'Zonemaster::Engine'->config->should_run('syntax06')
47 1 1 if 'Zonemaster::Engine'->config->should_run('syntax07')
50 1 1 if 'Zonemaster::Engine'->config->should_run('syntax08')
175 6 2 if (_name_has_only_legal_characters($name)) { }
202 2 23 if (_label_starts_with_hyphen($local_label))
211 2 23 if (_label_ends_with_hyphen($local_label))
222 5 4 if (scalar @{$name->labels;} and not scalar @results)
241 2 21 if (_label_not_ace_has_double_hyphen_in_position_3_and_4($local_label))
252 7 2 if (scalar @{$name->labels;} and not scalar @results)
281 5 1 if ($p and my($soa) = $p->get_records('SOA', 'answer')) { }
284 2 3 if (index($rname, '@') != -1) { }
314 8 1 if ($p and my($soa) = $p->get_records('SOA', 'answer')) { }
319 4 4 if (not &valid($rname)) { }
348 6 1 if ($p and my($soa) = $p->get_records('SOA', 'answer')) { }
366 7 0 if ($p) { }
386 30 2 if (&List::MoreUtils::all(sub { /\A[-A-Za-z0-9]+\z/msux; } , @{$name->labels;})) { }
397 0 25 unless $label
399 2 23 if ($label =~ /\A-/gmsux) { }
410 0 25 unless $label
412 2 23 if ($label =~ /-\z/gmsux) { }
423 0 98 unless $label
425 8 90 if ($label =~ /\A..--/msux and not $label =~ /\Axn/imsux) { }
441 22 35 if (not ref $item) { }
0 35 elsif (ref $item eq 'Zonemaster::Engine::Zone') { }
35 0 elsif (ref $item eq 'Zonemaster::Engine::DNSName') { }
460 0 24 unless (_name_has_only_legal_characters($name))
470 24 0 if ($name ne '.')
473 6 69 if (_label_not_ace_has_double_hyphen_in_position_3_and_4($local_label))
486 6 18 if ($tld =~ /\A\d+\z/gmsux)
499 17 7 unless (scalar @results)