Branch Coverage

lib/Sisimai/RFC2045.pm
Criterion Covered Total %
branch 109 120 90.8


line true false branch
22 4333 6049 if rindex($text1, " ") != -1
25 23000 1295 unless $e =~ /[ \t]*=[?][-_0-9A-Za-z]+[?][BbQq][?].+[?]=?[ \t]*/u
46 496 2973 if (__PACKAGE__->is_encoded(\$e)) { }
48 20 476 unless $e =~ /\A(.*)=[?]([-_0-9A-Za-z]+)[?]([BbQq])[?](.+)[?]=?(.*)\z/u
53 388 88 $qbencoding eq 'B' ? :
60 130 2843 scalar @textblocks ? :
63 0 3250 unless scalar @textblocks
66 412 2838 if ($ctxcharset and $qbencoding)
68 284 128 if $ctxcharset eq "utf-8"
70 128 284 unless ($ctxcharset eq "utf8")
73 0 128 if $@
86 46 0 $$argv0 =~ m[([+/=0-9A-Za-z\r\n]+)]u ? :
112 4269 6057 length $argv1 > 0 ? :
113 4269 6057 length $argv1 > 0 ? :
114 134 10192 if $paramindex == -1
118 6058 4134 unless $argv1 eq "boundary"
138 3629 504 if $start > -1
139 13 4120 if $start > 0
154 0 8909 unless $upperchunk
155 2388 6521 unless index($upperchunk, "Content-Type:") != -1
168 6521 5971 if (index($e, 'Content-Type:') == 0) { }
1461 4510 elsif (index($e, 'Content-Transfer-Encoding:') == 0) { }
273 4237 elsif (index($e, 'boundary=') != -1 or index($e, 'charset=') != -1) { }
171 304 6217 index($v, 'boundary=') != -1 ? :
179 0 273 unless length $headerpart->[0]
184 1 6520 if $heads
197 2172 4348 if index($mediatypev, "/rfc822") != -1
198 1970 2378 if index($mediatypev, "/delivery-status") != -1
199 66 2312 if index($mediatypev, "/feedback-report") != -1
200 1518 794 if length $ctencoding == 0
207 6202 318 if $lowerchunk ne "" and substr($lowerchunk, 0, 1) ne "\n"
219 0 2828 unless length $argv0
220 0 2827 unless length $$argv1
227 1267 1560 if length $multiparts->[0] < 8
228 2 2825 if scalar @$multiparts == 0
229 184 2641 if length $multiparts->[-1] < 8
234 462 8445 if (index($f->[0], 'multipart/') != -1) { }
238 0 462 if length $bodyinside < 9 or index($bodyinside, $boundary02) == -1
241 462 0 if scalar @$v
245 6057 2388 length $f->[-1] ? :
246 6057 2388 length $f->[0] ? :
250 0 2825 unless scalar @$partstable
256 2383 442 if $p > -1
269 46 2364 if index($argv0, "multipart/") == -1 or index($argv0, "boundary=") == -1
282 34 8409 if index($mediatypev, "text/") != 0 and index($mediatypev, "message/") != 0
284 12 8397 if ($mediatypev eq "text/html")
287 0 12 if index($argv0, "multipart/alternative") != -1
294 1425 6984 if (length $ctencoding) { }
296 34 1391 if ($ctencoding eq 'base64') { }
222 1169 elsif ($ctencoding eq 'quoted-printable') { }
880 289 elsif ($ctencoding eq '7bit') { }
304 24 10 if "Sisimai::String"->aligned(\$e->[0], ["charset", "=", "utf-8"])
305 5 5 unless $first10 =~ /[\x00-\x08\x0E-\x1F\x7F-]/u
308 5 29 if $dontset
316 67 813 if (lc $e->[0] =~ /$iso2022set/u) { }
330 12 1408 if $istexthtml
331 11 1409 unless $bodystring
332 5 1404 if index($bodystring, "\r\n") != -1
339 4213 4180 if (grep {index($mediatypev, $_) > 0;} @$delimiters)
347 344 8049 unless substr($bodystring, -2, 2) eq "\n\n"