Branch Coverage

blib/lib/JavaScript/Squish.pm
Criterion Covered Total %
branch 89 144 61.8


line true false branch
279 1 0 unless (ref $this)
285 0 1 ref $_[0] eq 'SCALAR' ? :
288 0 1 ref $_[0] eq 'HASH' ? :
291 0 1 if $opts{'DEBUG'}
295 0 1 if $opts{'DEBUG'}
299 0 1 if $opts{'DEBUG'}
301 0 1 if $opts{'remove_comments_exceptions'}
305 0 1 if $opts{'DEBUG'}
309 0 1 if $opts{'DEBUG'}
313 0 1 if $opts{'DEBUG'}
317 0 1 if $opts{'DEBUG'}
321 0 1 if $opts{'DEBUG'}
325 0 1 if $opts{'DEBUG'}
329 0 1 if $opts{'DEBUG'}
356 23 38 if ($_[0]) { }
357 0 23 ref $_[0] eq 'SCALAR' ? :
367 6 6 if ($_[0]) { }
377 6 6 if ($_[0]) { }
387 4 159 if ($_[0]) { }
400 0 2 if ($lf_position == -1) { }
404 0 2 if ($lf_position == 0) { }
410 0 2 if ($test_cr eq "\r") { }
426 0 0 if $$this{'_strings_extracted'}
433 0 0 unless $comment_state
442 0 0 if $$this{'_comments_extracted'}
449 0 0 unless $string_state
459 1 2 if ($$this{'_strings_extracted'})
466 0 3 if ($$this{'_comments_extracted'})
494 1427 540 if (not $inQuote) { }
497 16 1411 if ($c2 eq '//') { }
13 1398 elsif ($c2 eq '/*') { }
72 1326 elsif ($c eq '"' or $c eq q['] or $c eq '/' and not $lastnws =~ /[\)\.a-zA-Z0-9_\$\\]/) { }
513 8 351 if ($end eq '*/')
522 5 8 unless ($found_end)
530 5 316 if ($end eq '*/')
542 0 13 if (not $found_end) { }
562 72 0 unless $c =~ /\s/
567 915 411 unless $c =~ /\s/
572 72 468 if ($c eq $quoteChar and not $escaped) { }
0 468 elsif ($c eq '\\' and not $escaped) { }
579 72 0 unless $c =~ /\s/
584 0 0 unless $c =~ /\s/
588 390 78 unless $c =~ /\s/
592 6 119 if ($inQuote) { }
613 0 2 unless ($$this{'_strings_extracted'} and $$this{'_comments_extracted'})
630 0 2 unless ($string_state)
633 0 2 unless ($comment_state)
645 0 2 unless ($$this{'_strings_extracted'} and $$this{'_comments_extracted'})
653 40 50 if /^\s*$/
661 0 2 unless ($string_state)
664 0 2 unless ($comment_state)
676 0 2 unless ($$this{'_strings_extracted'} and $$this{'_comments_extracted'})
692 0 2 unless ($string_state)
695 0 2 unless ($comment_state)
709 0 2 unless ($$this{'_strings_extracted'} and $$this{'_comments_extracted'})
720 6 42 if (defined $last_eol and $last_eol =~ /[a-zA-Z0-9\\\$_}\])+\-"']/ || ord $last_eol > 126 and $first_char =~ /[a-zA-Z0-9\\\$_{[(+\-]/ || ord $first_char > 126) { }
40 2 elsif (defined $last_eol) { }
731 48 0 if ($line =~ /(\S)\s*$/)
739 0 2 unless ($comment_state)
744 0 2 unless ($string_state)
756 0 2 unless ($$this{'_strings_extracted'} and $$this{'_comments_extracted'})
767 0 2 unless ($string_state)
770 0 2 unless ($comment_state)
780 0 3 if (ref $opts{'exceptions'} eq 'ARRAY') { }
1 2 elsif (ref $opts{'exceptions'} eq 'Regexp' || !ref($opts{'exceptions'}) and $opts{'exceptions'}) { }
790 1 2 unless ($$this{'_strings_extracted'} and $$this{'_comments_extracted'})
802 1 28 if (grep {$comment =~ /$_/;} @exceptions) { }
810 1 2 if $exception_caught
814 0 3 unless ($string_state)
823 0 0 unless $$this{'_comments_extracted'}
842 0 3 unless $$this{'_strings_extracted'}
863 0 2 if ($data =~ /\r?\n$/) { }