Branch Coverage

blib/lib/Text/Shellwords/Cursor.pm
Criterion Covered Total %
branch 57 114 50.0


line true false branch
163 1 64 if $usingcp and $_ eq ''
168 0 0 $usingcp ? :
0 100 if $deb
172 54 46 if (/\G(\s+)/cg)
173 0 0 $usingcp ? :
0 54 if $deb
177 12 42 if ($usingcp and pos $_ >= $cursorpos)
179 8 4 unless (pos $_ == $cursorpos and pos $_ < length $_)
182 0 8 if $deb
193 40 60 if (/\G(['"])/cg)
198 0 40 if $deb
201 31 9 if ($usingcp and pos($_) - 1 < $cursorpos)
202 0 31 if $deb
206 20 20 if ($quote eq '"') { }
207 19 1 if (/\G((?:\\.|(?!["])[^\\])*)["]/cg) { }
210 1 0 unless ($fixclosequote)
216 0 0 if ($usingcp and pos $_ == $cursorpos)
218 0 19 if $deb
221 0 14 if $deb
222 9 5 if $usingcp and $ps < $cursorpos - $oldpos - $adjust
225 0 14 if $deb
228 19 1 if (/\G((?:\\.|(?!['])[^\\])*)[']/cg) { }
231 1 0 unless ($fixclosequote)
237 0 0 if ($usingcp and pos $_ == $cursorpos)
239 0 19 if $deb
242 0 12 if $deb
243 7 5 if $usingcp and $ps < $cursorpos - $oldpos - $adjust
246 0 12 if $deb
251 8 30 if ($usingcp and pos $_ == $cursorpos)
252 0 8 if $deb
256 0 38 if $deb
257 0 38 if ($$self{'keep_quotes'})
264 34 4 if ($usingcp and pos $_ >= $cursorpos)
274 40 58 if (/\G((?:\\.|[^\s\\"'\Q$tchrs\E])+)/cog)
278 0 40 if $deb
281 0 9 if $deb
282 3 6 if $usingcp and $ps < $cursorpos - $oldpos - $adjust
285 0 9 if $deb
287 0 40 if $deb
291 12 28 if ($usingcp and pos $_ >= $cursorpos)
299 0 98 if (length $tchrs and /\G([\Q$tchrs\E])/cog)
301 0 0 if $deb
304 0 0 if ($usingcp and pos $_ == $cursorpos)
313 0 0 defined $tokno ? :
0 0 defined $tokoff ? :
0 62 if $deb
426 2 63 if ($@)
427 0 2 if $args{'messages'} and $$self{'error'}
449 0 0 if (ref $arr ne 'ARRAY')
456 0 0 if ($$self{'keep_quotes'} and /^(['"])(.*)\1$/)
460 0 0 if $quote
463 0 0 $wantstr ? :
506 0 0 if (length $_ == 1 and index($tchrs, $_) >= 0)
507 0 0 if (index($s_none, $_) >= 0)
508 0 0 if (index($s_before, $_) >= 0)
509 0 0 if (index($s_after, $_) >= 0)
513 0 0 $sw ? :