Branch Coverage

blib/lib/Syntax/Highlight/Engine/Kate/LaTeX.pm
Criterion Covered Total %
branch 98 128 76.5


line true false branch
137 0 10 if ($self->testStringDetect($text, 'verb*', 0, 0, 0, undef, 0, 'Verb', 'Keyword'))
144 2 8 if ($self->testStringDetect($text, 'verb', 0, 0, 0, undef, 0, 'Verb', 'Keyword'))
151 2 6 if ($self->testRegExpr($text, '[a-zA-Z]+', 0, 0, 0, undef, 0, '#pop', 'Keyword'))
158 6 0 if ($self->testRegExpr($text, '[^a-zA-Z]', 0, 0, 0, undef, 0, '#pop', 'Keyword'))
170 4 126 if ($self->testDetectChar($text, '}', 0, 0, 0, undef, 0, '#pop#pop', 'Normal Text'))
177 0 126 if ($self->testDetectChar($text, ']', 0, 0, 0, undef, 0, '#pop#pop', 'Normal Text'))
184 6 120 if ($self->testRegExpr($text, '(semiverbatim|verbatim|lstlisting|boxedverbatim|Verbatim)\\*?', 0, 0, 0, undef, 0, 'VerbatimEnv', 'Environment'))
191 4 116 if ($self->testRegExpr($text, '(equation|displaymath|eqnarray|subeqnarray|math|multline|gather|align|alignat|flalign)\\*?', 0, 0, 0, undef, 0, 'MathEnv', 'Environment'))
203 14 0 if ($self->testDetectChar($text, '{', 0, 0, 0, undef, 0, 'Environment', 'Normal Text'))
210 0 0 if ($self->testRegExpr($text, '\\S', 0, 0, 0, undef, 0, '#pop', 'Normal Text'))
222 6 12 if ($self->testRegExpr($text, '\\s*\\{\\s*', 0, 0, 0, undef, 0, '#stay', 'Normal Text'))
229 6 6 if ($self->testRegExpr($text, '[^\\}\\{]+', 0, 0, 0, undef, 0, '#stay', 'Environment'))
236 6 0 if ($self->testRegExpr($text, '\\s*\\}\\s*', 0, 0, 0, undef, 0, '#pop', 'Normal Text'))
248 14 2 if ($self->testRegExpr($text, '[a-zA-Z]+', 0, 0, 0, undef, 0, '#pop', 'Keyword Mathmode'))
255 2 0 if ($self->testRegExpr($text, '[^a-zA-Z]', 0, 0, 0, undef, 0, '#pop', 'Keyword Mathmode'))
267 4 0 if ($self->testDetectChar($text, '}', 0, 0, 0, undef, 0, 'MathModeEnv', 'Normal Text'))
274 0 0 if ($self->testRegExpr($text, '\\S', 0, 0, 0, undef, 0, '#pop', 'Normal Text'))
286 4 8 if ($self->testDetectChar($text, '{', 0, 0, 0, undef, 0, '#stay', 'Normal Text'))
293 4 4 if ($self->testRegExpr($text, '[a-zA-Z]*(equation|displaymath|eqnarray|subeqnarray|math|multline|gather|align|alignat|flalign)\\*?', 0, 0, 0, undef, 0, '#stay', 'Environment'))
297 0 4 if ($self->testDetectSpaces($text, 0, undef, 0, '#stay', undef))
305 4 0 if ($self->testDetectChar($text, '}', 0, 0, 0, undef, 0, '#pop#pop#pop#pop#pop', 'Normal Text'))
319 2 228 if ($self->testDetect2Chars($text, '\\', ']', 0, 0, 0, undef, 0, '#pop', 'Math'))
328 2 226 if ($self->testDetect2Chars($text, '\\', ')', 0, 0, 0, undef, 0, '#pop', 'Math'))
336 2 224 if ($self->testRegExpr($text, '\\\\begin(?=[^a-zA-Z])', 0, 0, 0, undef, 0, '#stay', 'Keyword Mathmode'))
344 2 222 if ($self->testRegExpr($text, '\\\\end(?=[^a-zA-Z])', 0, 0, 0, undef, 0, '#stay', 'Keyword Mathmode'))
351 6 216 if ($self->testDetectChar($text, '\\', 0, 0, 0, undef, 0, 'MathContrSeq', 'Keyword Mathmode'))
359 2 214 if ($self->testStringDetect($text, '$$', 0, 0, 0, undef, 0, '#pop', 'Math'))
367 2 212 if ($self->testDetectChar($text, '$', 0, 0, 0, undef, 0, '#pop', 'Math'))
376 0 212 if ($self->testRegExpr($text, '%\\s*BEGIN.*$', 0, 0, 0, undef, 1, '#stay', 'Region Marker'))
385 0 212 if ($self->testRegExpr($text, '%\\s*END.*$', 0, 0, 0, undef, 1, '#stay', 'Region Marker'))
392 2 210 if ($self->testDetectChar($text, '%', 0, 0, 0, undef, 0, 'Comment', 'Comment'))
404 4 108 if ($self->testRegExpr($text, '\\\\end(?=\\s*\\{\\s*[a-zA-Z]*(equation|displaymath|eqnarray|subeqnarray|math|multline|gather|align|alignat|flalign)\\*?\\s*\\})', 0, 0, 0, undef, 0, 'MathFindEnd', 'Structure'))
412 4 104 if ($self->testRegExpr($text, '\\\\begin(?=[^a-zA-Z])', 0, 0, 0, undef, 0, '#stay', 'Keyword Mathmode'))
420 4 100 if ($self->testRegExpr($text, '\\\\end(?=[^a-zA-Z])', 0, 0, 0, undef, 0, '#stay', 'Keyword Mathmode'))
428 0 100 if ($self->testStringDetect($text, '\\(', 0, 0, 0, undef, 0, 'MathMode', 'Math'))
436 0 100 if ($self->testStringDetect($text, '\\[', 0, 0, 0, undef, 0, 'MathMode', 'Math'))
443 10 90 if ($self->testDetectChar($text, '\\', 0, 0, 0, undef, 0, 'MathContrSeq', 'Keyword Mathmode'))
451 0 90 if ($self->testStringDetect($text, '$$', 0, 0, 0, undef, 0, 'MathMode', 'Math'))
459 0 90 if ($self->testDetectChar($text, '$', 0, 0, 0, undef, 0, 'MathMode', 'Math'))
468 0 90 if ($self->testRegExpr($text, '%\\s*BEGIN.*$', 0, 0, 0, undef, 1, '#stay', 'Region Marker'))
477 0 90 if ($self->testRegExpr($text, '%\\s*END.*$', 0, 0, 0, undef, 1, '#stay', 'Region Marker'))
484 2 88 if ($self->testDetectChar($text, '%', 0, 0, 0, undef, 0, 'Comment', 'Comment'))
497 12 294 if ($self->testRegExpr($text, '\\\\begin(?=[^a-zA-Z])', 0, 0, 0, undef, 0, 'FindEnvironment', 'Structure'))
505 2 292 if ($self->testRegExpr($text, '\\\\end(?=[^a-zA-Z])', 0, 0, 0, undef, 0, 'FindEnvironment', 'Structure'))
512 6 286 if ($self->testRegExpr($text, '\\\\(label|pageref|ref|cite)(?=[^a-zA-Z])', 0, 0, 0, undef, 0, 'Label', 'Structure'))
519 2 284 if ($self->testRegExpr($text, '\\\\(part|chapter|section|subsection|subsubsection|paragraph|subparagraph)(?=[^a-zA-Z])', 0, 0, 0, undef, 0, '#stay', 'Structure'))
526 0 284 if ($self->testStringDetect($text, '\\renewcommand', 0, 0, 0, undef, 0, 'ToEndOfLine', 'Keyword'))
533 2 282 if ($self->testStringDetect($text, '\\newcommand', 0, 0, 0, undef, 0, 'ToEndOfLine', 'Keyword'))
541 2 280 if ($self->testStringDetect($text, '\\(', 0, 0, 0, undef, 0, 'MathMode', 'Math'))
549 2 278 if ($self->testStringDetect($text, '\\[', 0, 0, 0, undef, 0, 'MathMode', 'Math'))
556 10 268 if ($self->testDetectChar($text, '\\', 0, 0, 0, undef, 0, 'ContrSeq', 'Keyword'))
564 2 266 if ($self->testStringDetect($text, '$$', 0, 0, 0, undef, 0, 'MathMode', 'Math'))
572 2 264 if ($self->testDetectChar($text, '$', 0, 0, 0, undef, 0, 'MathMode', 'Math'))
581 0 264 if ($self->testRegExpr($text, '%\\s*BEGIN.*$', 0, 0, 0, undef, 1, '#stay', 'Region Marker'))
590 0 264 if ($self->testRegExpr($text, '%\\s*END.*$', 0, 0, 0, undef, 1, '#stay', 'Region Marker'))
597 12 252 if ($self->testDetectChar($text, '%', 0, 0, 0, undef, 0, 'Comment', 'Comment'))
615 2 0 if ($self->testRegExpr($text, '(.).*?\\1', 0, 0, 0, undef, 0, '#pop#pop', 'Verbatim'))
627 6 12 if ($self->testDetectChar($text, '{', 0, 0, 0, undef, 0, '#stay', 'Normal Text'))
634 6 6 if ($self->testRegExpr($text, '(semiverbatim|verbatim|lstlisting|boxedverbatim|Verbatim)\\*?', 0, 0, 0, undef, 0, '#stay', 'Environment'))
642 6 0 if ($self->testDetectChar($text, '}', 0, 0, 0, undef, 0, '#pop#pop#pop#pop#pop', 'Normal Text'))
654 6 258 if ($self->testRegExpr($text, '\\\\end(?=\\{(semiverbatim|verbatim|lstlisting|boxedverbatim|Verbatim)\\*?\\})', 0, 0, 0, undef, 0, 'VerbFindEnd', 'Structure'))
666 0 6 if ($self->testDetectChar($text, '*', 0, 0, 0, undef, 0, '#stay', 'Normal Text'))
673 6 0 if ($self->testDetectChar($text, '}', 0, 0, 0, undef, 0, 'Verbatim', 'Normal Text'))
680 0 0 if ($self->testRegExpr($text, '\\S', 0, 0, 0, undef, 0, '#pop', 'Normal Text'))