Branch Coverage

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


line true false branch
164 1 64 if $usingcp and $_ eq ''
169 0 0 $usingcp ? :
0 100 if $deb
173 54 46 if (/\G(\s+)/cg)
174 0 0 $usingcp ? :
0 54 if $deb
178 12 42 if ($usingcp and pos $_ >= $cursorpos)
180 8 4 unless (pos $_ == $cursorpos and pos $_ < length $_)
183 0 8 if $deb
194 40 60 if (/\G(['"])/cg)
199 0 40 if $deb
202 31 9 if ($usingcp and pos($_) - 1 < $cursorpos)
203 0 31 if $deb
207 20 20 if ($quote eq '"') { }
208 19 1 if (/\G((?:\\.|(?!["])[^\\])*)["]/cg) { }
211 1 0 unless ($fixclosequote)
217 0 0 if ($usingcp and pos $_ == $cursorpos)
219 0 19 if $deb
222 0 14 if $deb
223 9 5 if $usingcp and $ps < $cursorpos - $oldpos - $adjust
226 0 14 if $deb
229 19 1 if (/\G((?:\\.|(?!['])[^\\])*)[']/cg) { }
232 1 0 unless ($fixclosequote)
238 0 0 if ($usingcp and pos $_ == $cursorpos)
240 0 19 if $deb
243 0 12 if $deb
244 7 5 if $usingcp and $ps < $cursorpos - $oldpos - $adjust
247 0 12 if $deb
252 8 30 if ($usingcp and pos $_ == $cursorpos)
253 0 8 if $deb
257 0 38 if $deb
258 0 38 if ($$self{'keep_quotes'})
265 34 4 if ($usingcp and pos $_ >= $cursorpos)
275 40 58 if (/\G((?:\\.|[^\s\\"'\Q$tchrs\E])+)/cog)
279 0 40 if $deb
282 0 9 if $deb
283 3 6 if $usingcp and $ps < $cursorpos - $oldpos - $adjust
286 0 9 if $deb
288 0 40 if $deb
292 12 28 if ($usingcp and pos $_ >= $cursorpos)
300 0 98 if (length $tchrs and /\G([\Q$tchrs\E])/cog)
302 0 0 if $deb
305 0 0 if ($usingcp and pos $_ == $cursorpos)
314 0 0 defined $tokno ? :
0 0 defined $tokoff ? :
0 62 if $deb
427 2 63 if ($@)
428 0 2 if $args{'messages'} and $$self{'error'}
450 0 0 if (ref $arr ne 'ARRAY')
457 0 0 if ($$self{'keep_quotes'} and /^(['"])(.*)\1$/)
461 0 0 if $quote
464 0 0 $wantstr ? :
507 0 0 if (length $_ == 1 and index($tchrs, $_) >= 0)
508 0 0 if (index($s_none, $_) >= 0)
509 0 0 if (index($s_before, $_) >= 0)
510 0 0 if (index($s_after, $_) >= 0)
514 0 0 $sw ? :