Condition Coverage

blib/lib/Lingua/EN/AddressParse.pm
Criterion Covered Total %
condition 22 36 61.1


and 3 conditions

line !l l&&!r l&&r condition
447 0 0 4 defined $args{'country'} and $args{'country'} =~ /^(AU|Australia|GB|United Kingdom|US|United States|CA|Canada)$/
511 2 11 2 $address->{'country_code'} ne 'US' and $address->{'input_string'} =~ m[^(\d{1,4}[A-Z]{0,2})[/| ](\d+[ \w-].*)$]
555 170 16 1 $curr_key eq 'street_name' and $curr_value =~ /^US HIGHWAY (.*)/
569 1 4 0 length $word > 1 and not $word =~ /\d/
674 0 0 0 $address->{'error'} and $address->{'force_case'}
985 0 14 0 $address->{'force_post_code'} and not $address->{'components'}{'post_code'}
1260 0 33 1 length $word > 1 and not $word =~ /[AEIOUY]|ST|MT|JN?R|SN?R/

or 3 conditions

line l !l&&r !l&&!r condition
605 1 0 33 length $curr_value == 1 or length $curr_value == 2
1158 0 1 14 $input =~ / ?(\d{1,2}(ST|ND|RD|TH) (FLOOR|FLR|FL) )/ or $input =~ m[ ?(LEVEL (\d{1,2}|[GM])[/ -])]
1 0 14 $input =~ / ?(\d{1,2}(ST|ND|RD|TH) (FLOOR|FLR|FL) )/ or $input =~ m[ ?(LEVEL (\d{1,2}|[GM])[/ -])] or $input =~ m[ ?((FLOOR|FLR|FL) \d{1,2}[/ -])]
1187 0 1 14 $input =~ / ?(($bld) ([A-Z]{1,2}|\d+) )/ or $input =~ / ?(($bld) \d{1,3}[A-Z] )/
1 0 14 $input =~ / ?(($bld) ([A-Z]{1,2}|\d+) )/ or $input =~ / ?(($bld) \d{1,3}[A-Z] )/ or $input =~ / ?(($bld) [A-Z]\d{1,3} )/