Branch Coverage

blib/lib/Lingua/RU/Inflect.pm
Criterion Covered Total %
branch 109 132 82.5


line true false branch
202 4 39 if $patronym =~ /\x{43d}\x{430}$/
203 8 31 if $patronym =~ /[\x{438}\x{44b}]\x{447}$/
210 8 2734 if $firstname eq $_
214 5 2193 if $firstname eq $_
218 6 102 if $firstname eq $_
222 12 6 unless ($ambiguous)
224 5 7 if $firstname =~ /[\x{430}\x{44f}]$/
226 7 0 unless $firstname =~ /[\x{430}\x{435}\x{451}\x{438}\x{43e}\x{443}\x{44b}\x{44d}\x{44e}\x{44f}]$/
231 2 4 if $lastname =~ /(\x{435}\x{432}|\x{438}\x{43d}|\x{44b}\x{43d}|\x{451}\x{432}|\x{43e}\x{432})\x{430}$/
232 2 2 if $lastname =~ /(\x{435}\x{432}|\x{438}\x{43d}|\x{44b}\x{43d}|\x{451}\x{432}|\x{43e}\x{432})$/
234 0 2 if $lastname =~ /(\x{430}\x{44f}|\x{44f}\x{44f})$/
235 0 2 if $lastname =~ /(\x{438}\x{439}|\x{44b}\x{439})$/
256 0 22 if $case eq -1
258 0 22 if $case < 0 or $case > 4
266 15 7 unless $patronym
268 2 5 if $patronym =~ s/\x{43d}\x{430}$/('ны', 'не', 'ну', 'ной', 'не')[$case];/e
269 1 4 if $patronym =~ s/\x{44b}\x{447}$/('ыча', 'ычу', 'ыча', 'ычем', 'ыче')[$case];/e
276 2 20 unless $firstname
285 1 19 if $firstname =~ /[\x{435}\x{451}\x{438}\x{43e}\x{443}\x{44b}\x{44d}\x{44e}]$/i
286 0 19 if $firstname =~ /[\x{430}\x{435}\x{451}\x{438}\x{43e}\x{443}\x{44b}\x{44d}\x{44e}\x{44f}]\x{430}$/i
287 0 19 if $firstname =~ /[\x{430}\x{451}\x{43e}\x{443}\x{44b}\x{44d}\x{44e}\x{44f}]\x{44f}$/i
290 1 18 if !defined($gender) || $gender == 0 and $firstname =~ /[\x{431}\x{432}\x{433}\x{434}\x{436}\x{437}\x{43a}\x{43b}\x{43c}\x{43d}\x{439}\x{43f}\x{440}\x{441}\x{442}\x{444}\x{445}\x{446}\x{447}\x{448}\x{449}]$/i
295 0 18 if $firstname =~ s/\x{438}\x{44f}$/('ии', 'ии', 'ию', 'ией', 'ие')[$case];/e
296 2 16 if $firstname =~ s/([\x{433}\x{436}\x{439}\x{43a}\x{445}\x{447}\x{448}\x{449}])\x{430}$/$1 . ('и', 'е', 'у', 'ой', 'е')[$case];/e
297 6 10 if $firstname =~ s/\x{430}$/('ы', 'е', 'у', 'ой', 'е')[$case];/e
298 1 9 if $firstname =~ s/\x{43c}\x{44f}$/('мени', 'мени', 'мя', 'менем', 'мени')[$case];/e
299 3 6 if $firstname =~ s/\x{44f}$/('и', 'е', 'ю', 'ей', 'е')[$case];/e
300 1 5 if $firstname =~ s/\x{439}$/('я', 'ю', 'я', 'ем', 'е')[$case];/e
303 4 1 if ($gender == 1) { }
1 0 elsif ($gender == 0) { }
304 0 4 if $firstname =~ s/\x{44c}$/('я', 'ю', 'я', 'ем', 'е')[$case];/e
307 1 0 if $firstname =~ s/\x{44c}$/('и', 'и', 'ь', 'ью', 'и')[$case];/e
316 2 20 unless $lastname
317 1 19 unless defined $gender
320 1 18 if $lastname =~ /[\x{435}\x{451}\x{438}\x{43e}\x{443}\x{44b}\x{44d}\x{44e}]$/i
321 0 18 if $lastname =~ /[\x{430}\x{435}\x{451}\x{438}\x{43e}\x{443}\x{44b}\x{44d}\x{44e}\x{44f}]\x{430}$/i
324 0 18 if $lastname =~ /[\x{451}\x{43e}\x{443}\x{44b}\x{44d}\x{44e}]\x{44f}$/i
325 1 17 if $lastname =~ /[\x{438}\x{44b}]\x{445}$/i
329 5 12 if $lastname =~ /(\x{438}\x{43d}|\x{44b}\x{43d}|\x{435}\x{432}|\x{451}\x{432}|\x{43e}\x{432})\x{430}$/ and $lastname =~ s/\x{430}$/('ой', 'ой', 'у', 'ой', 'ой')[$case];/e
336 4 8 if $lastname =~ /(\x{438}\x{43d}|\x{44b}\x{43d}|\x{435}\x{432}|\x{451}\x{432}|\x{43e}\x{432})$/ and $lastname .= ('а', 'у', 'а', 'ым', 'е')[$case]
340 0 8 if $lastname =~ s/\x{430}\x{44f}$/('ой', 'ой', 'ую', 'ой', 'ой')[$case];/e
341 0 8 if $lastname =~ s/\x{44f}\x{44f}$/('ей', 'ей', 'юю', 'ей', 'ей')[$case];/e
342 1 7 if $lastname =~ s/\x{43a}\x{438}\x{439}$/('кого', 'кому', 'кого', 'ким', 'ком')[$case];/e
343 0 7 if $lastname =~ s/\x{438}\x{439}$/('его', 'ему', 'его', 'им', 'ем')[$case];/e
344 0 7 if $lastname =~ s/\x{44b}\x{439}$/('ого', 'ому', 'ого', 'ым', 'ом')[$case];/e
345 1 6 if $lastname =~ s/\x{43e}\x{439}$/('ого', 'ому', 'ого', 'ым', 'ом')[$case];/e
348 4 2 if ($gender == 1)
349 1 3 if $lastname =~ s/\x{430}$/('ы', 'е', 'у', 'ой', 'е')[$case];/e
350 1 2 if $lastname =~ s/\x{43c}\x{44f}$/('мени', 'мени', 'мя', 'менем', 'мени')[$case];/e
351 0 2 if $lastname =~ s/\x{44f}$/('и', 'е', 'ю', 'ёй', 'е')[$case];/e
352 0 2 if $lastname =~ s/\x{439}$/('я', 'ю', 'й', 'ем', 'е')[$case];/e
353 0 2 if $lastname =~ s/\x{44c}$/('я', 'ю', 'я', 'ем', 'е')[$case];/e
379 1 22 if $case eq -1
465 0 47 unless my $preposition = lc shift()
466 0 47 unless local $_ = lc shift()
471 9 33 if $word eq $_[1]
481 2 25 if /^$word/
484 4 1 /^[\x{432}\x{444}][^\x{430}\x{435}\x{451}\x{438}\x{43e}\x{443}\x{44b}\x{44d}\x{44e}\x{44f}]/ ? :
489 2 1 if $word eq $_
495 4 7 if /^$word/
501 1 19 if $word eq $_
504 2 2 /^[\x{430}\x{438}\x{43e}\x{443}\x{44b}\x{44d}]/ ? :
510 2 1 if $word eq $_
515 1 10 if /^\x{43c}\x{43d}\x{43e}/
517 5 5 /^[\x{436}\x{437}\x{441}\x{448}][^\x{430}\x{435}\x{451}\x{438}\x{43e}\x{443}\x{44b}\x{44d}\x{44e}\x{44f}]/i ? :
528 0 47 unless exists $GRAMMAR{$preposition}