blib/lib/Vim/X/Plugin/ResolveConflict.pm

filter: Statementstmt 68.1% 15 / 22 Branchbran 0.0% 0 / 8 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 83.3% 5 / 6 Podpod 0.0% 0 / 1 totaltotal 54.0% 20 / 37 SCAR 20.9
CC
5
Cov
50%
ResolveConflict
30.0
BEGIN
1.0
BEGIN
1.0
CRAP 8.1
« blib/lib/Vim/X/Buffer.pm ↑ Summary Build »
1 package Vim::X::Plugin::ResolveConflict;
2 BEGIN {
3 1 ▶ $Vim::X::Plugin::ResolveConflict::AUTHORITY = 'cpan:YANICK';
Subroutine BEGIN: called CC=1 SCAR=0.0
4 }
5 1 $Vim::X::Plugin::ResolveConflict::VERSION = '1.1.0';
6 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 1 ▶use Vim::X;
Subroutine BEGIN: called CC=1 SCAR=0.0
10  
11 sub ResolveConflict :Vim(args) {
12 0 ▶ my $side = shift;
Subroutine ResolveConflict: not called CC=5 SCAR=34.0
Pod undocumented
13  
14 0 my $here = vim_cursor;
15 0 my $mine = $here->clone->rewind(qr/^<{7}/);
16 0 my $midway = $mine->clone->ff( qr/^={7}/ );
17 0 my $theirs = $midway->clone->ff( qr/^>{7}/ );
18  
19 0 ▶ $here = $side eq 'here' ? $here
Branch: 4 branches
BranchTrueFalseTotal
$side eq 'here' ? : 0 0 0
$side eq 'mine' ? : 0 0 0
$side eq 'theirs' ? : 0 0 0
$side eq 'both' ? : 0 0 0
20 : $side eq 'mine' ? $mine
21 : $side eq 'theirs' ? $theirs
22 : $side eq 'both' ? $midway
23 : die "side '$side' is invalid"
24 ;
25  
26 0 vim_delete(
27 # delete the marker
28 $mine, $midway, $theirs,
29 # and whichever side we're not on
30 ( $midway..$theirs ) x ($here < $midway),
31 ( $mine..$midway ) x ($here > $midway),
32 );
33  
34 1 ▶};
Subroutine BEGIN: called CC=1 SCAR=0.0
35  
36 1 1;
37  
38 __END__
« blib/lib/Vim/X/Buffer.pm ↑ Summary Build »