Branch Coverage

blib/lib/arXiv/FileGuess.pm
Criterion Covered Total %
branch 65 120 54.1


line true false branch
126 1 30 if m[(^|/)00README\.XXX$]
129 0 30 if m[(^|/)(head|body)\.tmp$]
133 0 30 if m[(^|/)missfont.log$]
135 0 30 if /\.(sty|cls|mf|\d*pk|bbl|bst|tfm|ax|def|log|hrfldf|cfg|clo|inx|end|fgx|tbx|rtx|rty|toc)$/i
136 0 30 if /\.abs$/
137 0 30 if /\.fig$/
138 0 30 if /\.nb$/i
139 0 30 if /\.inp$/i
141 0 30 if /\.html?$/i
142 0 30 if /\.cry$/
145 0 30 if -z $filename
149 2 28 unless open my $FILE_TO_GUESS, '<', $_
161 0 28 if $b1 == 31 and $b2 == 157
162 0 28 if $b1 == 31 and $b2 == 139
163 3 0 if $b1 == 66 and $b2 == 90 and $b3 == 104 and $b4 > 47
170 0 25 if (read $FILE_TO_GUESS, $tar_test, 5 and $tar_test eq 'ustar')
175 1 24 if $b1 == 247 and $b2 == 2
177 0 24 if sprintf('%c%c%c%c', $b1, $b2, $b3, $b4) eq 'GIF8'
179 0 24 if sprintf('%c%c%c%c%c%c%c%c', $b1, $b2, $b3, $b4, $b5, $b6, $b7, $b8) eq "\211PNG\r\n\cZ\n"
182 0 0 if $b1 == 77 and $b2 == 77 and $filename =~ /\.tif/i
184 0 0 if $b1 == 255 and $b2 == 216 and $b3 == 255 and $b4 == 224 || $b4 == 238
187 0 1 if $b1 == 0 and $b2 == 0 and $b3 == 1 and $b4 == 179
189 7 17 if ("PK\cC\cD" eq sprintf('%c%c%c%c', $b1, $b2, $b3, $b4) or "PK00PK\cC\cD" eq sprintf('%c%c%c%c%c%c%c%c', $b1, $b2, $b3, $b4, $b5, $b6, $b7, $b8))
191 1 6 if $filename =~ /\.jar$/i
192 1 5 if $filename =~ /\.odt$/i
193 2 3 if $filename =~ /\.docx$/i
196 1 16 if 'Rar!' eq sprintf('%c%c%c%c', $b1, $b2, $b3, $b4)
200 2 0 if $b1 == 197 and $b2 == 208 and $b3 == 211 and $b4 == 198
205 0 14 if index($one_kb, '%PDF-') >= 0
206 0 14 if $one_kb =~ m[#!/bin/csh -f\r#|(\r|^)begin \d{1,4}\s+\S.*\r[^\n]]
214 0 40 if (/\%auto-ignore/ and $. <= 10)
217 0 40 if ($. <= 10 and /\\input texinfo/)
220 0 40 if ($. <= 40 and /(^|\r)Content-type: /i)
228 4 36 if ($. <= 7 and $accum =~ /^(......)?%\!(PS-AdobeFont-1\.|FontType1|PS-Adobe-3\.0\ Resource-Font)/s)
233 0 36 if ($. == 1 and /^%\!/)
237 0 36 if ($. == 1 and /^\%*\004%\!/ || /.*%\!PS-Adobe/ or $. <= 10 and /^%\!PS/ and not $maybe_tex)
242 0 36 if ($. <= 12 and /^\r?%\&([^\s\n]+)/)
243 0 0 if ($1 eq 'latex209' or $1 eq 'biglatex' or $1 eq 'latex' or $1 eq 'LaTeX') { }
250 0 36 if ($. <= 10 and /\s]/i)
253 0 36 if ($. <= 10 and /\%auto-include/)
259 1 35 if (/(^|\r)\s*\\documentstyle/)
262 8 27 if (/(^|\r)\s*\\documentclass/)
265 0 27 if (/(^|\r)\s*(\\font|\\magnification|\\input|\\def|\\special|\\baselineskip|\\begin)/)
267 0 0 if /\\input\s+amstex/
269 0 27 if (/(^|\r)\s*\\(end|bye)(\s|$)/)
272 0 27 if (/\\(end|bye)(\s|$)/)
275 0 27 if (/\\input *(harv|lanl)mac/ or /\\input\s+phyzzx/)
278 0 27 if (/beginchar\(/)
281 0 27 if (/(^|\r)\@(book|article|inbook|unpublished)\{/i)
284 0 27 if (/^begin \d{1,4}\s+[^\s]+\r?$/)
285 0 0 if $maybe_tex_priority
286 0 0 if $maybe_tex
287 0 0 if /\r$/
290 0 27 if (/paper deliberately replaced by what little/)
294 0 1 unless close $FILE_TO_GUESS
296 0 1 if $maybe_tex_priority
297 0 1 if $maybe_tex_priority2
298 0 1 if $maybe_tex
312 8 0 if (seek $filehandle, 0, 0)
317 5 290 if (/^[^%]*\\includegraphics[^%]*\.(?:pdf|png|gif|jpg)\s?\}/i or $. < $lines_to_search and /^[^%]*\\pdfoutput(?:\s+)?=(?:\s+)?1/)