Condition Coverage

blib/lib/Mojolicious/Plugin/RenderFile.pm
Criterion Covered Total %
condition 26 37 70.2


and 3 conditions

line !l l&&!r l&&r condition
19 7 1 6 $args{'filename'} and not utf8::is_utf8($args{'filename'})
20 5 2 7 $args{'filepath'} and not utf8::is_utf8($args{'filepath'})
28 13 1 0 $args{'format'} and $args{'content_type'}
40 0 0 9 -f $filepath and -r $filepath
74 0 1 5 $range =~ /^bytes=(\d+)-(\d+)?/ and $1 <= $end
76 2 0 3 defined $2 and $2 <= $end

or 2 conditions

line l !l condition
23 1 13 $args{'status'} || 200
24 1 13 $args{'content_disposition'} || 'attachment'
25 0 14 $args{'cleanup'} // 0
35 2 12 $content_type ||= 'application/x-download'
49 1 0 $c->req->url->path->parts->[-1] || 'download'

or 3 conditions

line l !l&&r !l&&!r condition
34 0 1 0 $content_type ||= $c->app->types->type($args{'format'})
45 3 6 0 $filename ||= fileparse($filepath)
49 4 1 0 $filename ||= $c->req->url->path->parts->[-1] || 'download'