Condition Coverage

blib/lib/Win32/Script.pm
Criterion Covered Total %
condition 56 406 13.7


and 3 conditions

line !l l&&!r l&&r condition
65 0 0 0 $Interact and $GUI
0 0 0 $Interact and $GUI and not $^S
86 0 0 0 not $opt =~ /\+/ and %acl
136 0 0 1 $^O ne 'dos' and $] >= 5.006
0 0 1 $^O ne 'dos' and $] >= 5.006 and not $src =~ /[?*]/
0 0 1 $^O ne 'dos' and $] >= 5.006 and not $src =~ /[?*]/ and not $dst =~ /[?*]/
0 0 1 $^O ne 'dos' and $] >= 5.006 and not $src =~ /[?*]/ and not $dst =~ /[?*]/ and -s $src < 2097152
0 0 1 $^O ne 'dos' and $] >= 5.006 and not $src =~ /[?*]/ and not $dst =~ /[?*]/ and -s $src < 2097152 and not -d $src
0 1 0 $^O ne 'dos' and $] >= 5.006 and not $src =~ /[?*]/ and not $dst =~ /[?*]/ and -s $src < 2097152 and not -d $src and -e $dst || (!($opt =~ /d/) && $dst =~ m[(.+)[\\/][^\\/]+$] ? -d $1 : 0)
140 0 1 0 -f $dst ? unlink($dst) : 1 and $^O eq 'MSWin32' ? Win32::CopyFile($src, $dst, 1) : eval "use File::Copy; File::Copy::copy('${src}','${dst}')"
149 0 0 0 $ENV{'OS'} && $ENV{'OS'} =~ /windows_nt/i
0 0 0 $rsp and $ENV{'OS'} && $ENV{'OS'} =~ /windows_nt/i ? !(-e $dst) : !(-d $dst)
190 4 0 0 -f $elem and not unlink($elem)
191 0 0 0 $opt =~ /r/i and not FileDelete($opt, "$elem/*")
246 0 0 0 not -f $file and -f $fileto
276 0 0 3 !$sub || ref $dir and ref $_[$#_]
0 1 2 !$sub || ref $dir and ref $_[$#_] and $i <= $#_
288 0 2 0 @stat == 0 and $opt =~ /[^!]*i/i || $^O eq 'MSWin32' && $elem =~ /[\?]/i
0 0 0 $stat[2] & 40960 and $opt =~ /!.*s/i
0 0 0 $fs != $stat[2] and $opt =~ /!.*m/i
293 0 0 0 $stat[2] & 16384 and $opt =~ /!.*l/i
297 0 0 0 $stat[2] & 16384 and $opt =~ /!.*d/i
300 0 0 0 $stat[2] & 16384 and not $opt =~ /!.*[rl]/i
392 0 1 0 $op =~ /[\+i]/i and $isct == -1
396 0 0 0 $i <= $#ini and not $ini[$i] =~ /^\s*[\[]/i
402 0 0 0 $i <= $#ini and not $ini[$i] =~ /^\s*[\[]/i
416 0 0 0 $op =~ /[\-]/i and $inme != -1
0 0 0 $op =~ /[\+]/i and $inme == -1
430 1 1 1 $op =~ /[\+i]/i and $inme == -1
0 0 1 $op =~ /[\+o]/ and $val ne $val1
445 0 0 0 @_ && $_[0] =~ /^-/i
447 0 0 0 defined $f and not $f =~ /\./i
448 0 0 0 defined $f and $opt =~ /[mda]/i
483 0 0 0 @_ and not defined $_[0]
0 0 0 @_ and not defined $_[0] and $FileLog ne ''
508 0 0 0 defined $nmb and !$max || $max < $nmb
524 0 1 0 defined $nmb and !$min || $min > $nmb
533 0 1 2 not $opt =~ /[asb]/i and wantarray
545 0 0 0 &$sub() && push(@rez, $_)
581 0 0 0 $f = 'Win32::API'->new('kernel32', 'GetDiskFreeSpaceEx', ['P', 'P', 'P', 'P'], 'N') and $f->Call("$disk\000", $sc, $sb, $nf)
584 0 0 0 $f = 'Win32::API'->new('kernel32', 'GetDiskFreeSpace', ['P', 'P', 'P', 'P', 'P'], 'N') and $f->Call("$disk\000", $sc, $sb, $nf, $nt)
609 0 0 1 dbmopen %dbm, "$dst/FileTrack", 438 and open TRACK, ">>$dst/FileTrack.log"
618 0 1 0 @stat == 0 and $opt =~ /[^!i]*i/i || $^O eq 'MSWin32' && /[\?]/i
0 0 0 $stat[2] & 16384 and $opt =~ /!.*d/i
624 0 0 0 $1 != $stat[9] && !($opt =~ /!.*t/i)
638 0 0 0 $stat[2] & 16384 and not $opt =~ /!.*r/i
650 0 0 0 dbmclose %dbm and close TRACK
713 0 0 0 $] >= 5.008 && !eval('${^ENCODING}')
742 0 0 0 $ENV{'OS'} and $ENV{'OS'} =~ /Windows_NT/i
891 0 0 0 @_ > 0 and not defined $_[0]
893 0 0 0 $type and not $type =~ /^REG_/i
0 0 0 $type and not $type =~ /^REG_/i and $val =~ /^REG_/i
916 0 0 0 open OLDIN, '<&STDIN' and pipe STDIN, OUT
963 0 0 0 $Echo and $Interact
966 0 0 0 @wnd and defined $ks
0 0 0 @wnd and defined $ks and $ks eq ''
0 0 0 not @wnd and defined $ks
0 0 0 not @wnd and defined $ks and $ks eq ''
984 0 0 0 $from and $to
985 0 0 0 not $from and $r =~ /^(from|sender):(.*)/i
0 0 0 not $to and $r =~ /^to:(.*)/i
1022 6 37 0 @_ > 1 && ref $_[0] eq 'CODE'
1029 0 0 6 $Echo and ref $_[$#_] ne 'CODE'
1060 0 0 0 $opt =~ /n/i and lc $os ne 'windows_nt'
1062 0 0 0 !$ENV{$$e[0]} || $opt =~ /y/i and $ENV{$$e[0]} = $$e[1]
1088 0 0 0 not $opt =~ /y/i and lc($ENV{'HOME'} || '?') eq lc $pu
1090 0 0 0 $os ne 'windows_nt' && !Registry('LMachine\\Network\\Logon\\\\UserProfiles')
1145 0 0 0 $u and exists $WScript{$n}

or 2 conditions

line l !l condition
144 0 0 eval { do { (Win32::GetOSVersion())[1] } } || eval q[use Win32::TieRegistry; $$Registry{'LMachine\\Software\\Microsoft\\Windows NT\\CurrentVersion\\\\CurrentVersion'}] || 0
0 0 $ENV{'OS'} || ''
385 0 0 $$row[1] || '+'
409 0 0 $$row[1] || '+'
495 0 2 $mask || 511
576 0 1 $_[0] || 'c:\\'
796 0 0 eval q[use Win32::TieRegistry; my $v =$$Registry{'LMachine\\Software\\Microsoft\\Windows\\CurrentVersion\\\\Version'}; $v =~s/ /_/ig; $v] || 'Windows_95'
803 0 0 eval q[use Win32::TieRegistry;$$Registry{'LMachine\\Software\\Microsoft\\Windows\\CurrentVersion\\\\Version'}] || ''
822 0 0 [split(/\./, $v, 0)]->[$_[1]] || ''
825 0 0 eval q[use Win32::TieRegistry; $$Registry{'LMachine\\Software\\Microsoft\\Windows\\CurrentVersion\\\\CSDVersion'} || $$Registry{'LMachine\\Software\\Microsoft\\Windows NT\\CurrentVersion\\\\CSDVersion'}] || ''
833 0 0 eval q[use Win32::TieRegistry;$$Registry{'LMachine\\Software\\Microsoft\\Windows\\CurrentVersion\\\\ProductId'} || $$Registry{'LMachine\\Software\\Microsoft\\Windows NT\\CurrentVersion\\\\ProductId'}] || ''
936 0 0 $$Registry{'Classes\\inffile\\shell\\Install\\command\\\\'} || 'rundll32.exe setupx.dll,InstallHinfSection DefaultInstall 132 %1'
955 0 0 $ks || ''
1057 0 0 shift() || 'nh'
1070 0 0 OrArgs('-d', @_, 'c:\\Home') || (return 0)
1088 0 0 $ENV{'HOME'} || '?'
1095 0 0 $ENV{$$e[0]} || '?'
1106 0 1 $_[0] || ''
0 1 $_[1] || ''
1107 1 0 $ENV{'HOME'} || ''

or 3 conditions

line l !l&&r !l&&!r condition
82 0 0 0 $sub or grep {not $_ =~ /^(full|change|read)$/i;} values %acl
126 0 0 1 $@ or $ret < 0
136 1 0 0 -e $dst || (!($opt =~ /d/) && $dst =~ m[(.+)[\\/][^\\/]+$] ? -d $1 : 0)
186 2 0 2 $_[0] =~ /^\-/ || $_[0] eq ''
234 0 2 4 not defined $_ or $_ ne $row
237 0 1 0 !$mtd || FileWrite($file, @dta)
242 0 0 0 $fileto eq $_ || FileWrite($file, $_)
259 0 0 0 not defined $_ or print OUT $_, "\n"
263 0 0 0 not $mtd or rename $fileto, $file
276 2 1 0 !$sub || ref $dir
288 1 0 1 $opt =~ /[^!]*i/i || $^O eq 'MSWin32' && $elem =~ /[\?]/i
330 0 0 0 $_ eq '.' or $_ eq '..'
0 0 0 $_ eq '.' or $_ eq '..' or not $_ =~ /^$msk$/i
345 0 0 1 ref $file or ref \$file eq 'GLOB'
421 2 0 1 $$row[2] || (!defined($$row[1]) ? '-' : '+')
486 0 0 0 !defined($^S) || $^S
505 0 0 0 not $elem or -d $elem
508 0 0 0 !$max || $max < $nmb
521 0 0 1 not $elem or -d $elem
0 0 1 not $elem or -d $elem or not $elem =~ m[([\d]+)[^\\/]*$]
524 1 0 0 !$min || $min > $nmb
618 0 0 1 $opt =~ /[^!i]*i/i || $^O eq 'MSWin32' && /[\?]/i
623 0 0 0 $stat[2] & 16384 || !($opt =~ /[^!]*t/i)
630 0 0 0 $opt =~ /!.*c/i or $stat[2] & 16384
639 0 0 0 FileTrack($opt, "$src/$nme[1]", "$dst/$nme[1]", $sub) || $chg
671 0 22 0 not defined $row or print OUT $row, "\n"
693 0 0 0 eval 'use Net::FTP; Net::FTP->new($host);' || croak("FTP ${host}: $@")
742 0 0 0 not $_[1] or $_[1] =~ m[^/d]i
0 0 0 not $ENV{'OS'} or $ENV{'OS'} =~ /Windows_95/i
769 0 0 0 OLEGet(@_) || OLECreate(@_)
803 0 0 1 $^O eq 'MSWin32' ? eval q[use Win32::TieRegistry;$$Registry{'LMachine\\Software\\Microsoft\\Windows\\CurrentVersion\\\\Version'}] || '' : '' or `%COMSPEC% /c ver` =~ /\n*([^\n]+)\n*/i ? $1 : ''
0 0 1 $^O eq 'MSWin32' ? eval q[use Win32::TieRegistry;$$Registry{'LMachine\\Software\\Microsoft\\Windows\\CurrentVersion\\\\Version'}] || '' : '' or `%COMSPEC% /c ver` =~ /\n*([^\n]+)\n*/i ? $1 : '' or $ENV{'OS'}
810 0 0 0 $ENV{'windir'} || Platform('windir')
813 0 0 1 ($^O eq 'MSWin32' ? eval qq[use Win32::TieRegistry; my \$v =\n\t\t(\$\$Registry{'LMachine\\Software\\Microsoft\\Windows\\CurrentVersion\\\\VersionNumber'} || \$\$Registry{'LMachine\\Software\\Microsoft\\Windows NT\\CurrentVersion\\\\CurrentVersion'} || '')\n\t\t.".".\n\t\t(\$\$Registry{'LMachine\\Software\\Microsoft\\Windows\\CurrentVersion\\\\SubVersionNumber'} || \$\$Registry{'LMachine\\Software\\Microsoft\\Windows NT\\CurrentVersion\\\\CurrentBuildNumber'} || '')\n\t\t; \$v =~s/ //ig; \$v] : '') || (`%COMSPEC% /c ver` =~ /(Version|\245\340\341\250\357)\s*([^ \]]+)/im ? $2 : '')
841 0 0 0 eval { do { Win32::NodeName() } } || lc eval q[use Win32::TieRegistry; $$Registry{'LMachine\\\\System\\\\CurrentControlSet\\\\Control\\\\ComputerName\\\\ComputerName\\\\\\\\ComputerName'}]
858 0 0 0 eval { do { Win32::LoginName() } } || lc eval q[use Win32::TieRegistry; $$Registry{'LMachine\\\\System\\\\CurrentControlSet\\\\Control\\\\\\\\Current User'}] || (`net config` =~ /(User name|\217\256\253\354\247\256\242\240\342\245\253\354)\s*([^ ]+)$/im ? $2 : '')
0 0 1 getlogin or $^O eq 'MSWin32' ? eval { do { Win32::LoginName() } } || lc eval q[use Win32::TieRegistry; $$Registry{'LMachine\\\\System\\\\CurrentControlSet\\\\Control\\\\\\\\Current User'}] || (`net config` =~ /(User name|\217\256\253\354\247\256\242\240\342\245\253\354)\s*([^ ]+)$/im ? $2 : '') : ''
0 0 1 getlogin or $^O eq 'MSWin32' ? eval { do { Win32::LoginName() } } || lc eval q[use Win32::TieRegistry; $$Registry{'LMachine\\\\System\\\\CurrentControlSet\\\\Control\\\\\\\\Current User'}] || (`net config` =~ /(User name|\217\256\253\354\247\256\242\240\342\245\253\354)\s*([^ ]+)$/im ? $2 : '') : '' or $ENV{'USERNAME'}
0 0 1 getlogin or $^O eq 'MSWin32' ? eval { do { Win32::LoginName() } } || lc eval q[use Win32::TieRegistry; $$Registry{'LMachine\\\\System\\\\CurrentControlSet\\\\Control\\\\\\\\Current User'}] || (`net config` =~ /(User name|\217\256\253\354\247\256\242\240\342\245\253\354)\s*([^ ]+)$/im ? $2 : '') : '' or $ENV{'USERNAME'} or $ENV{'LOGNAME'}
962 0 0 0 !defined($ks) || $ks ne ''
975 0 0 0 not defined $ks or $ks eq ''
0 0 0 not defined $ks or $ks eq '' or Win32::GuiTest::SendKeys($ks)
1003 0 0 1 @_ == 0 || $_[0] =~ /^\d+$/i
1029 0 0 0 $^S || $ErrorDie == 2
1037 0 0 0 $@ or @_
1040 0 0 0 $^S || $ErrorDie == 2
1062 0 0 0 !$ENV{$$e[0]} || $opt =~ /y/i
1071 0 0 0 $ENV{'USERNAME'} || Platform('user')
1086 0 0 0 $ENV{'USERPROFILE'} || UserPath()
1087 0 0 0 eval { do { Win32::GetShortPathName($pu) } } || $pu
1115 0 0 0 $syn{lc $pd} || $pd
1121 0 0 0 !defined($pd) || $pd eq ''
1122 0 0 0 $$Registry{$ha . $pd} || $$Registry{$hu . $pd}
0 0 0 $$Registry{$hu . $pd} || ($u =~ /^\.*default$/i && lc $pd eq 'start menu' ? $$Registry{$hu . ($e = $pd = 'Programs')} : '') || $$Registry{$ha . $pd}