Condition Coverage

blib/lib/YAML/Perl/Scanner.pm
Criterion Covered Total %
condition 96 147 65.3


and 3 conditions

line !l l&&!r l&&r condition
148 1287 9 55 defined $next and $next == $self->tokens_taken
169 192 0 2 $ch eq '%' and $self->check_directive
173 144 20 28 $ch eq '-' and $self->check_document_start
177 163 0 1 $ch eq '.' and $self->check_document_end
201 117 0 20 $ch eq '-' and $self->check_block_entry
205 116 0 1 $ch eq '?' and $self->check_key
209 89 0 27 $ch eq ':' and $self->check_value
225 72 0 3 $ch eq '|' and not $self->flow_level
229 71 0 1 $ch eq '>' and not $self->flow_level
284 18 71 6 !$self->flow_level && $self->indent == $self->reader->column
677 20 0 28 $self->reader->prefix(3) eq '---' and $self->reader->peek(3) =~ /^[\0\ \t\r\n\x85\x{2028}\x{2029}]$/
689 0 0 1 $self->reader->prefix(3) eq '...' and $self->reader->peek(3) =~ /^[\0\ \t\r\n\x85\x{2028}\x{2029}]$/
738 193 30 0 $self->reader->index == 0 and $self->reader->peek eq 'FEFF'
1053 0 0 12 $self->reader->column == $indent and $self->reader->peek ne "\000"
1064 4 0 8 $self->reader->column == $indent and $self->reader->peek ne "\000"
1070 6 0 2 $folded and $line_break eq "\n"
6 0 2 $folded and $line_break eq "\n" and $leading_non_space
0 0 2 $folded and $line_break eq "\n" and $leading_non_space and not $self->reader->peek =~ /^[\ \t]$/
1104 4 0 0 defined $chomping and $chomping == 1
1234 10 4 20 $self->reader->column < $indent and $self->reader->peek eq ' '
1240 0 0 0 $self->reader->column < $indent and $self->reader->peek eq ' '
1329 17 4 6 not $double and $ch eq q[']
21 4 2 not $double and $ch eq q['] and $self->reader->peek(1) eq q[']
8 17 0 $double and $ch eq q[']
17 6 2 not $double and $ch =~ /^[\"\\]$/
6 13 4 $double and $ch eq '\\'
1435 10 0 0 $prefix eq '---' || $prefix eq '...' and $self->reader->peek(3) =~ /^[\0\ \t\r\n\x85\x{2028}\x{2029}]$/
1477 50 94 18 not $self->flow_level and $ch eq ':'
144 0 18 not $self->flow_level and $ch eq ':' and $self->reader->peek($length + 1) =~ /^[\0\ \t\r\n]$/
94 32 18 $self->flow_level and $ch =~ /^[\,\:\?\[\]\{\}]$/
1489 48 12 6 $self->flow_level and $ch eq ':'
60 6 0 $self->flow_level and $ch eq ':' and not $self->reader->peek($length + 1) =~ /^[\0\ \t\r\n\,\[\]\{\}]$/
1509 1 36 29 defined $spaces && @$spaces
0 2 27 not $self->flow_level and $self->reader->column < $indent
1545 27 0 1 $prefix eq '---' || $prefix eq '...' and $self->reader->peek(3) =~ /$linefeed/
1558 0 0 0 $prefix eq '---' || $prefix eq '...' and $self->reader->peek(3) =~ /$linefeed/

or 3 conditions

line l !l&&r !l&&!r condition
255 64 1 1 not defined $min_token_number or $key->token_number < $min_token_number
268 24 0 117 $key->line != $self->reader->line or $self->reader->index - $key->index > 1024
285 56 39 0 $self->allow_simple_key || !$required
730 64 0 0 !($ch =~ /^[\0\ \r\n\x85\x{2028}\x{2029}\-\?\:\,\[\]\{\}\#\&\*\!\|\>\'\"\%\@\`]$/) || !($self->reader->peek(1) =~ /^[\0\ \t\r\n\x85\x{2028}\x{2029}]$/) && ($ch eq '-' || !$self->flow_level && $ch =~ /^[\?\:]$/)
1101 4 0 0 not defined $chomping or $chomping == 1
1329 0 0 25 $double and $ch eq q['] or not $double and $ch =~ /^[\"\\]$/
1435 0 0 10 $prefix eq '---' || $prefix eq '...'
1477 30 0 162 $ch =~ /^[\0\ \t\r\n]$/ or not $self->flow_level and $ch eq ':' and $self->reader->peek($length + 1) =~ /^[\0\ \t\r\n]$/
18 0 144 $ch =~ /^[\0\ \t\r\n]$/ or not $self->flow_level and $ch eq ':' and $self->reader->peek($length + 1) =~ /^[\0\ \t\r\n]$/ or $self->flow_level and $ch =~ /^[\,\:\?\[\]\{\}]$/
1509 37 0 29 not defined $spaces && @$spaces or $self->reader->peek eq '#'
37 0 29 not defined $spaces && @$spaces or $self->reader->peek eq '#' or not $self->flow_level and $self->reader->column < $indent
1545 0 1 27 $prefix eq '---' || $prefix eq '...'
1558 0 0 0 $prefix eq '---' || $prefix eq '...'