Branch Coverage

blib/lib/CSS/LESSp.pm
Criterion Covered Total %
branch 68 212 32.0


line true false branch
56 0 57 if ($$self{'type'} eq 'function')
62 37 0 if $parents
64 1 36 unless defined $$self{'children'}
71 2 35 if (defined $$self{'id'})
72 0 2 $name =~ /\,/ ? :
74 4 2 unless defined $$parent{'name'}
75 0 2 $$parent{'name'} =~ /\,/ ? :
79 0 2 $name =~ /^\:/ ? :
100 0 0 if ($self->isFunction) { }
112 37 20 unless defined $$self{'rules'}
121 0 0 if $parents
125 0 0 unless defined $$self{'functions'}
137 0 0 if $parents
141 0 0 if (defined $$self{'variables'}{$variable})
148 0 0 if defined $$parent{'variables'}{$variable}
156 0 0 if $parents
160 0 0 if (defined $$self{'children'})
162 0 0 if $$style{'name'} eq $name
170 0 0 if $$style{'name'} eq $name
176 0 0 unless defined $parents[0]{'id'}
177 0 0 if (defined $$root{'children'})
182 0 0 if (defined $$style{'name'} and $$style{'name'} eq $name)
185 0 0 if (defined $$style{'fullname'} and $$style{'fullname'} eq $name)
189 0 0 if $return
190 0 0 if $fullNameSelector
195 0 0 if (defined $$self{'functions'})
197 0 0 if $$function{'name'} eq $name
201 0 0 if (defined $$parent{'functions'})
203 0 0 if $$function{'name'} eq $name
207 0 0 if (defined $$root{'children'})
212 0 0 if (defined $$style{'functions'})
214 0 0 if (defined $$function{'name'} and $$function{'name'} eq $name)
220 0 0 if $return
221 0 0 if $fullNameSelector
231 0 0 if (defined $$self{'rules'})
233 0 0 if join('', keys %{$rule;}) eq $property
252 1 36 if (defined $$style{'children'}) { }
259 3 1 if $level == 0
274 0 0 if (defined $$self{'rules'})
275 0 0 unless defined $$targetSelector{'rules'}
282 0 0 if (defined $$self{'variables'})
289 0 0 if (defined $$self{'children'})
300 0 0 if (defined $$style{'variables'})
307 0 0 if (defined $$style{'rules'})
316 0 0 if (defined $$style{'children'}) { }
319 0 0 if ($l != $level)
337 0 0 if (defined $$self{'variables'})
341 0 0 if $variables[$position]
347 0 0 if (defined $$self{'rules'})
348 0 0 unless defined $$targetSelector{'rules'}
358 0 0 if ($var =~ s/^\-//)
370 0 0 if (defined $$self{'children'})
381 0 0 if (defined $$style{'variables'})
388 0 0 if (defined $$style{'rules'})
397 0 0 if (defined $$style{'children'}) { }
400 0 0 if ($l != $level)
415 3 0 if (defined $$self{'rules'})
426 37 0 if (defined $$style{'rules'})
428 8 29 if $#{$$style{'rules'};} > 0
430 28 29 if $#{$$style{'rules'};} > 0
432 28 29 if $#{$$style{'rules'};} > 0
458 2 0 if (not $eval =~ /[a-z]/i and defined(my $result = eval $eval))
459 2 0 if defined $result and $removed
464 1 56 if ($value =~ m[(\d+)\s*(px|pt|em|cm|%)*\s*(\+|\*|/)\s*((\d+)\s*(px|pt|em|cm|%)*|\d+)] or $value =~ /(\d+)\s*(px|pt|em|cm|%)*\s*(\-)\s+((\d+)\s*(px|pt|em|cm|%)*|\d+)/)
466 1 0 if $eval =~ s/(px|pt|em|cm|%)//g
467 0 1 unless ($eval =~ /[a-z]/i)
469 0 0 if defined $result and $removed
470 0 0 if not $@ and defined $result
474 2 55 if ($value =~ /\#[abcdef0123456789]{6}/i and $value =~ m[(\+|\-|\*|/)])
485 0 6 unless (/[a-z]/i)
487 0 0 if ($eval < 0)
488 0 0 if ($eval > 255)
492 0 2 if $return
509 573 2143 if ($mode)
510 19 554 if $mode eq 'delete'
511 41 532 if (length $stop == 1 and $_ eq $stop)
512 1 572 if (length $stop == 2 and $lastChar . $_ eq $stop) { }
515 162 1981 if /\n/
519 94 1887 if (/\}/ or /\;/)
524 57 37 if ($buffer)
526 57 0 if ($buffer =~ s/^\s*([^:]*)\s*\:\s*(.*)\s*$//)
532 0 57 if ($value =~ /^(#|.)(.*)\[(.*)\]$/)
541 0 0 if ($targetProperty =~ /^\@/) { }
547 0 0 if $return
550 57 0 unless ($selector->isFunction)
557 0 0 if ($var =~ s/^\-//)
566 0 57 if ($property =~ /^\@(\w+\-*\w*)/) { }
574 0 57 if ($buffer =~ s/^(\..*)$// or $buffer =~ s/^(\#.*)$//)
581 0 0 $source =~ /\,/ ? :
585 0 0 if ($source =~ /\>/ and not $sourceSelector)
588 0 0 if $pSelector
590 0 0 if ($source =~ /(.*)\((.*)\)/ and not $sourceSelector)
593 0 0 $vars =~ /\;/ ? :
596 0 0 unless $sourceSelector
597 0 0 if ($sourceSelector->isFunction) { }
605 0 57 if $buffer
607 37 57 if /\}/
612 37 1944 if (/\{/)
617 37 0 if ($buffer)
619 0 37 if ($buffer =~ /(.*)\s*\((\@*.*)\)/ and not $buffer =~ /^.*[:].*\(/) { }
624 0 0 $vars =~ /\,/ ? :
626 0 0 unless $var
640 6 1975 if (/\"/ or /\'/)
641 35 1946 if (/\(/)
642 0 1981 if ($lastChar =~ m[/] and m[/])
643 1 1980 if ($lastChar =~ m[/] and /\*/)