Branch Coverage

blib/lib/MediaWiki/DumpFile/SQL.pm
Criterion Covered Total %
branch 37 72 51.3


line true false branch
18 0 2 unless (defined $file)
45 2 2 unless ($self->parse_more)
78 0 2 unless ($line =~ /^-- MySQL dump/)
95 2 36 if (/^CREATE TABLE `([^`]+)` \(/)
103 0 2 unless defined $table
108 2 8 if (/^\)/) { }
4 4 elsif (/^\s+`([^`]+)` (\w+)/) { }
116 0 2 unless (scalar @cols)
133 0 4 unless (defined $fh)
140 2 38 unless (defined $insert)
141 0 2 unless close $fh
147 2 36 if ($insert =~ /^INSERT INTO/)
165 0 2 unless /^INSERT INTO `(.*?)` VALUES /g
166 0 2 if ($$self{'table_name'} ne $1)
185 0 460 if ($@)
190 184 276 unless ($col =~ /^#/)
198 90 2 if (/\G, ?/cg) { }
2 0 elsif (/\G;$/cg) { }
257 0 4 unless (defined $type)
261 2 2 if ($type eq 'int') { }
2 0 elsif ($type eq 'varchar') { }
0 0 elsif ($type eq 'float') { }
281 0 0 if ($input eq '\\\\') { }
0 0 elsif ($input eq q[\\']) { }
0 0 elsif ($input eq '\\"') { }
0 0 elsif ($input eq '\\n') { }
0 0 elsif ($input eq '\\t') { }
307 0 92 if /\GNULL/cg
308 0 92 unless /\G(-?[\d]+)/cg
314 0 0 if /\GNULL/cg
315 0 0 unless /\G(-?[\d]+(?:\.[\d]+(e-?[\d]+)?)?)/cg
323 0 92 if /\GNULL/cg
328 0 92 unless /'((?:[^\\']*(?:\\.[^\\']*)*))'/cg
338 0 92 unless /\G, ?/cg
344 0 92 unless /\G\(/cg
350 0 92 unless /\G\)/cg