diff --git a/docs/libcurl/mksymbolsmanpage.pl b/docs/libcurl/mksymbolsmanpage.pl
index c1a6b9d61b..9d93abdcbd 100755
--- a/docs/libcurl/mksymbolsmanpage.pl
+++ b/docs/libcurl/mksymbolsmanpage.pl
@@ -25,7 +25,7 @@
use POSIX qw(strftime);
my @ts;
-if (defined($ENV{SOURCE_DATE_EPOCH})) {
+if(defined($ENV{SOURCE_DATE_EPOCH})) {
@ts = localtime($ENV{SOURCE_DATE_EPOCH});
} else {
@ts = localtime;
diff --git a/scripts/cd2cd b/scripts/cd2cd
index a4de2f8757..f1ade5a429 100755
--- a/scripts/cd2cd
+++ b/scripts/cd2cd
@@ -54,7 +54,7 @@ while(1) {
use POSIX qw(strftime);
my @ts;
-if (defined($ENV{SOURCE_DATE_EPOCH})) {
+if(defined($ENV{SOURCE_DATE_EPOCH})) {
@ts = localtime($ENV{SOURCE_DATE_EPOCH});
} else {
@ts = localtime;
diff --git a/scripts/cd2nroff b/scripts/cd2nroff
index b868a4a79f..b77122f932 100755
--- a/scripts/cd2nroff
+++ b/scripts/cd2nroff
@@ -76,7 +76,7 @@ HELP
use POSIX qw(strftime);
my @ts;
-if (defined($ENV{SOURCE_DATE_EPOCH})) {
+if(defined($ENV{SOURCE_DATE_EPOCH})) {
@ts = gmtime($ENV{SOURCE_DATE_EPOCH});
} else {
@ts = localtime;
diff --git a/scripts/checksrc.pl b/scripts/checksrc.pl
index 8dbb3f384e..43b8195537 100755
--- a/scripts/checksrc.pl
+++ b/scripts/checksrc.pl
@@ -169,17 +169,17 @@ sub readlocalfile {
$i++;
# Lines starting with '#' are considered comments
- if (/^\s*(#.*)/) {
+ if(/^\s*(#.*)/) {
next;
}
- elsif (/^enable ([A-Z]+)$/) {
+ elsif(/^enable ([A-Z]+)$/) {
if(!defined($warnings_extended{$1})) {
print STDERR "invalid warning specified in .checksrc: \"$1\"\n";
next;
}
$warnings{$1} = $warnings_extended{$1};
}
- elsif (/^disable ([A-Z]+)$/) {
+ elsif(/^disable ([A-Z]+)$/) {
if(!defined($warnings{$1})) {
print STDERR "invalid warning specified in .checksrc: \"$1\"\n";
next;
@@ -187,10 +187,10 @@ sub readlocalfile {
# Accept-list
push @alist, $1;
}
- elsif (/^banfunc ([^ ]*)/) {
+ elsif(/^banfunc ([^ ]*)/) {
$banfunc{$1} = $1;
}
- elsif (/^allowfunc ([^ ]*)/) {
+ elsif(/^allowfunc ([^ ]*)/) {
undef $banfunc{$1};
}
else {
@@ -344,7 +344,7 @@ readlocalfile($file);
do {
if("$wlist" !~ / $file /) {
my $fullname = $file;
- $fullname = "$dir/$file" if ($fullname !~ '^\.?\.?/');
+ $fullname = "$dir/$file" if($fullname !~ '^\.?\.?/');
scanfile($fullname);
}
$file = shift @ARGV;
diff --git a/scripts/completion.pl b/scripts/completion.pl
index a7cf97bdad..7b689c74fb 100755
--- a/scripts/completion.pl
+++ b/scripts/completion.pl
@@ -40,13 +40,13 @@ Pod::Usage::pod2usage() if $help;
my @opts = parse_main_opts($opts_dir);
-if ($shell eq 'fish') {
+if($shell eq 'fish') {
print "# curl fish completion\n\n";
print "# Complete file paths after @\n";
print q(complete -c curl -n 'string match -qr "^@" -- (commandline -ct)' -k -xa "(printf '%s\n' -- @(__fish_complete_suffix --complete=(commandline -ct | string replace -r '^@' '') ''))");
print "\n\n";
print qq{$_ \n} foreach (@opts);
-} elsif ($shell eq 'zsh') {
+} elsif($shell eq 'zsh') {
my $opts_str;
$opts_str .= qq{ $_ \\\n} foreach (@opts);
@@ -99,10 +99,10 @@ sub parse_main_opts {
$file_content = $1;
my ($short, $long, $arg, $desc);
- if ($file_content =~ /^Short:\s+(.*)\s*$/im) {$short = "-$1";}
- if ($file_content =~ /^Long:\s+(.*)\s*$/im) {$long = "--$1";}
- if ($file_content =~ /^Arg:\s+(.*)\s*$/im) {$arg = $1;}
- if ($file_content =~ /^Help:\s+(.*)\s*$/im) {$desc = $1;}
+ if($file_content =~ /^Short:\s+(.*)\s*$/im) {$short = "-$1";}
+ if($file_content =~ /^Long:\s+(.*)\s*$/im) {$long = "--$1";}
+ if($file_content =~ /^Arg:\s+(.*)\s*$/im) {$arg = $1;}
+ if($file_content =~ /^Help:\s+(.*)\s*$/im) {$desc = $1;}
$arg =~ s/\:/\\\:/g if defined $arg;
$desc =~ s/'/'\\''/g if defined $desc;
@@ -112,7 +112,7 @@ sub parse_main_opts {
my $option = '';
- if ($shell eq 'fish') {
+ if($shell eq 'fish') {
$option .= "complete --command curl";
$option .= " --short-option '" . strip_dash(trim($short)) . "'"
if defined $short;
@@ -120,23 +120,23 @@ sub parse_main_opts {
if defined $long;
$option .= " --description '" . strip_dash(trim($desc)) . "'"
if defined $desc;
- } elsif ($shell eq 'zsh') {
+ } elsif($shell eq 'zsh') {
$option .= '{' . trim($short) . ',' if defined $short;
$option .= trim($long) if defined $long;
$option .= '}' if defined $short;
$option .= '\'[' . trim($desc) . ']\'' if defined $desc;
- if (defined $arg) {
+ if(defined $arg) {
$option .= ":'$arg'";
- if ($arg =~ /|/) {
+ if($arg =~ /|/) {
$option .= ':_files';
- } elsif ($arg =~ //) {
+ } elsif($arg =~ //) {
$option .= ":'_path_files -/'";
- } elsif ($arg =~ //i) {
+ } elsif($arg =~ //i) {
$option .= ':_urls';
- } elsif ($long =~ /ftp/ && $arg =~ //) {
+ } elsif($long =~ /ftp/ && $arg =~ //) {
$option .= ":'(multicwd nocwd singlecwd)'";
- } elsif ($arg =~ //) {
+ } elsif($arg =~ //) {
$option .= ":'(DELETE GET HEAD POST PUT)'";
}
}
diff --git a/scripts/managen b/scripts/managen
index 5e03180144..ac54e5e0b6 100755
--- a/scripts/managen
+++ b/scripts/managen
@@ -49,7 +49,7 @@ my %catlong;
use POSIX qw(strftime);
my @ts;
-if (defined($ENV{SOURCE_DATE_EPOCH})) {
+if(defined($ENV{SOURCE_DATE_EPOCH})) {
@ts = gmtime($ENV{SOURCE_DATE_EPOCH});
} else {
@ts = localtime;
@@ -195,7 +195,7 @@ sub printdesc {
chomp $l;
lastline($baselvl + $lvl + 1, $l);
my $w = ($baselvl + $lvl + 1) * $indent + length($l);
- if ($w > $colwidth) {
+ if($w > $colwidth) {
print STDERR "ERROR: $w columns is too long\n";
print STDERR "$l\n";
$error++;
@@ -1176,7 +1176,7 @@ sub mainpage {
.\\"
.TH curl 1 "$date" "curl $version" "curl Manual"
HEADER
- if ($manpage);
+ if($manpage);
while(<$fh>) {
my $f = $_;
diff --git a/scripts/mdlinkcheck b/scripts/mdlinkcheck
index 7df3f03d5c..33fcac9de6 100755
--- a/scripts/mdlinkcheck
+++ b/scripts/mdlinkcheck
@@ -162,4 +162,4 @@ for my $l (sort keys %flink) {
}
}
-exit 1 if ($error);
+exit 1 if($error);
diff --git a/scripts/mk-ca-bundle.pl b/scripts/mk-ca-bundle.pl
index 79c78eb85b..cb0b586093 100755
--- a/scripts/mk-ca-bundle.pl
+++ b/scripts/mk-ca-bundle.pl
@@ -268,7 +268,7 @@ sub oldhash {
return $hash;
}
-if( $opt_p !~ m/:/ ) {
+if($opt_p !~ m/:/) {
print "Error: Mozilla trust identifier list must include both purposes and levels\n";
HELP_MESSAGE();
}
@@ -285,7 +285,7 @@ sub should_output_cert(%) {
foreach my $level (@included_mozilla_trust_levels) {
# for each level we want to output, see if any of our desired purposes are
# included
- return 1 if( defined( List::Util::first { is_in_list( $_, @included_mozilla_trust_purposes ) } @{$trust_purposes_by_level{$level}} ) );
+ return 1 if(defined( List::Util::first { is_in_list( $_, @included_mozilla_trust_purposes ) } @{$trust_purposes_by_level{$level}} ));
}
return 0;
@@ -656,8 +656,8 @@ unless($stdout) {
$bk++;
}
rename $crt, "$crt.~${bk}~" or die "Failed to create backup $crt.~$bk}~: $!\n";
- } elsif( -e $crt ) {
- unlink( $crt ) or die "Failed to remove $crt: $!\n";
+ } elsif(-e $crt) {
+ unlink($crt) or die "Failed to remove $crt: $!\n";
}
rename "$crt.~", $crt or die "Failed to rename $crt.~ to $crt: $!\n";
}
diff --git a/scripts/singleuse.pl b/scripts/singleuse.pl
index 13a9ff54e1..b6ec18b47f 100755
--- a/scripts/singleuse.pl
+++ b/scripts/singleuse.pl
@@ -176,7 +176,7 @@ open(N, "nm $file|") ||
my %exist;
my %uses;
my $file;
-while () {
+while() {
my $l = $_;
chomp $l;
diff --git a/scripts/top-complexity b/scripts/top-complexity
index 27c23d2c74..59629d9603 100755
--- a/scripts/top-complexity
+++ b/scripts/top-complexity
@@ -32,7 +32,7 @@ use warnings;
sub checkcmd {
my ($cmd)=@_;
my @paths;
- if ($^O eq 'MSWin32' || $^O eq 'dos' || $^O eq 'os2') {
+ if($^O eq 'MSWin32' || $^O eq 'dos' || $^O eq 'os2') {
# PATH separator is different
@paths=(split(';', $ENV{'PATH'}));
}
@@ -41,7 +41,7 @@ sub checkcmd {
"/sbin", "/usr/bin", "/usr/local/bin");
}
for(@paths) {
- if( -x "$_/$cmd" && ! -d "$_/$cmd" ) {
+ if(-x "$_/$cmd" && ! -d "$_/$cmd") {
# executable bit but not a directory!
return "$_/$cmd";
}
diff --git a/src/mk-file-embed.pl b/src/mk-file-embed.pl
index 9daa519e89..17530cfa14 100755
--- a/src/mk-file-embed.pl
+++ b/src/mk-file-embed.pl
@@ -44,7 +44,7 @@ const unsigned char ${varname}[] = {
HEAD
;
-while () {
+while() {
my $line = $_;
foreach my $n (split //, $line) {
my $ord = ord($n);
diff --git a/src/mkhelp.pl b/src/mkhelp.pl
index 63d59e89f6..e104e49f18 100755
--- a/src/mkhelp.pl
+++ b/src/mkhelp.pl
@@ -34,7 +34,7 @@ push @out, " / __| | | | |_) | |\n";
push @out, " | (__| |_| | _ <| |___\n";
push @out, " \\___|\\___/|_| \\_\\_____|\n";
-while () {
+while() {
my $line = $_;
push @out, $line;
}
@@ -58,7 +58,7 @@ if($c) {
IO::Compress::Gzip->import();
1;
};
- print STDERR "Warning: compression requested but Gzip is not available\n" if (!$c)
+ print STDERR "Warning: compression requested but Gzip is not available\n" if(!$c)
}
if($c)
diff --git a/tests/appveyor.pm b/tests/appveyor.pm
index 2a6a5d58c0..ed1728682c 100644
--- a/tests/appveyor.pm
+++ b/tests/appveyor.pm
@@ -65,7 +65,7 @@ sub appveyor_create_test_result {
}
' \\
'$appveyor_baseurl/api/tests'`;
- print "AppVeyor API result: $appveyor_result\n" if ($appveyor_result);
+ print "AppVeyor API result: $appveyor_result\n" if($appveyor_result);
$APPVEYOR_TEST_NAMES{$testnum}=$testname;
}
@@ -111,7 +111,7 @@ sub appveyor_update_test_result {
}
' \\
'$appveyor_baseurl/api/tests'`;
- print "AppVeyor API result: $appveyor_result\n" if ($appveyor_result);
+ print "AppVeyor API result: $appveyor_result\n" if($appveyor_result);
if($appveyor_category eq 'Error') {
$appveyor_result=`$curl --silent --noproxy '*' \\
--header 'Content-Type: application/json' \\
@@ -123,7 +123,7 @@ sub appveyor_update_test_result {
}
' \\
'$appveyor_baseurl/api/build/messages'`;
- print "AppVeyor API result: $appveyor_result\n" if ($appveyor_result);
+ print "AppVeyor API result: $appveyor_result\n" if($appveyor_result);
}
}
diff --git a/tests/data/test1056 b/tests/data/test1056
index 7ecc349823..afcdf137ee 100644
--- a/tests/data/test1056
+++ b/tests/data/test1056
@@ -62,7 +62,7 @@ HTTP follow redirect from IPv4 to IPv6 with scope
http://%HOSTIP:%HTTPPORT/we/are/all/twits/%TESTNUMBER -L
-%PERL -e "print 'Test is not supported on the Windows kernel' if ($^O eq 'MSWin32' || $^O eq 'msys' || $^O eq 'cygwin');"
+%PERL -e "print 'Test is not supported on the Windows kernel' if($^O eq 'MSWin32' || $^O eq 'msys' || $^O eq 'cygwin');"
diff --git a/tests/data/test1082 b/tests/data/test1082
index 7d26323a73..40e7b6a70c 100644
--- a/tests/data/test1082
+++ b/tests/data/test1082
@@ -35,7 +35,7 @@ HTTP GET with localhost --interface
http://%HOSTIP:%HTTPPORT/%TESTNUMBER -4 --interface 127.0.0.1
-%PERL -e "print 'Test requires default test client host address' if ( '%CLIENTIP' ne '127.0.0.1' );"
+%PERL -e "print 'Test requires default test client host address' if('%CLIENTIP' ne '127.0.0.1');"
diff --git a/tests/data/test1083 b/tests/data/test1083
index e588d7e7d1..dae302b110 100644
--- a/tests/data/test1083
+++ b/tests/data/test1083
@@ -39,7 +39,7 @@ HTTP-IPv6 GET with ip6-localhost --interface
-g "http://%HOST6IP:%HTTP6PORT/%TESTNUMBER" --interface ip6-localhost
-%PERL -e "if ('%CLIENT6IP' ne '[::1]') {print 'Test requires default test client host address';} else {exec '%RESOLVE --ipv6 ip6-localhost'; print 'Cannot run precheck resolve';}"
+%PERL -e "if('%CLIENT6IP' ne '[::1]') {print 'Test requires default test client host address';} else {exec '%RESOLVE --ipv6 ip6-localhost'; print 'Cannot run precheck resolve';}"
diff --git a/tests/data/test1506 b/tests/data/test1506
index 0a62c0c2a6..90f1ed421c 100644
--- a/tests/data/test1506
+++ b/tests/data/test1506
@@ -89,7 +89,7 @@ Accept: */*
* Connection #3 to host server4.example.com left intact
-$_ = '' if (($_ !~ /left intact/) && ($_ !~ /Closing connection/))
+$_ = '' if(($_ !~ /left intact/) && ($_ !~ /Closing connection/))
diff --git a/tests/data/test1510 b/tests/data/test1510
index d2316c0112..23ef9517c9 100644
--- a/tests/data/test1510
+++ b/tests/data/test1510
@@ -89,7 +89,7 @@ Accept: */*
* Connection #3 to host server4.example.com left intact
-$_ = '' if (($_ !~ /left intact/) && ($_ !~ /Closing connection/))
+$_ = '' if(($_ !~ /left intact/) && ($_ !~ /Closing connection/))
diff --git a/tests/data/test1512 b/tests/data/test1512
index c3a532c96b..c0c23467b2 100644
--- a/tests/data/test1512
+++ b/tests/data/test1512
@@ -74,7 +74,7 @@ Accept: */*
^Host:.*
-$_ = '' if (($_ !~ /left intact/) && ($_ !~ /Closing connection/))
+$_ = '' if(($_ !~ /left intact/) && ($_ !~ /Closing connection/))
diff --git a/tests/data/test1542 b/tests/data/test1542
index 0454d76dde..25df4a46e3 100644
--- a/tests/data/test1542
+++ b/tests/data/test1542
@@ -62,7 +62,7 @@ Accept: */*
== Info: Connection #1 to host %HOSTIP left intact
-$_ = '' if (($_ !~ /left intact/) && ($_ !~ /(closing|shutting down) connection #\d+/))
+$_ = '' if(($_ !~ /left intact/) && ($_ !~ /(closing|shutting down) connection #\d+/))
diff --git a/tests/data/test2072 b/tests/data/test2072
index c1a252094a..f2acceb78b 100644
--- a/tests/data/test2072
+++ b/tests/data/test2072
@@ -27,7 +27,7 @@ file:// with Unix path resolution behavior for the case of extra slashes
file:////%FILE_PWD/%LOGDIR/test%TESTNUMBER.txt
-%PERL -e "print 'Test requires a Unix system' if ( $^O eq 'MSWin32' || $^O eq 'cygwin' || $^O eq 'dos' || $^O eq 'msys');"
+%PERL -e "print 'Test requires a Unix system' if($^O eq 'MSWin32' || $^O eq 'cygwin' || $^O eq 'dos' || $^O eq 'msys');"
foo
diff --git a/tests/data/test2402 b/tests/data/test2402
index 48a485624e..52c582415f 100644
--- a/tests/data/test2402
+++ b/tests/data/test2402
@@ -102,7 +102,7 @@ Via: 2 nghttpx
* Connection #0 to host localhost left intact
-$_ = '' if (($_ !~ /left intact/) && ($_ !~ /Closing connection/))
+$_ = '' if(($_ !~ /left intact/) && ($_ !~ /Closing connection/))
diff --git a/tests/data/test2404 b/tests/data/test2404
index 89461a4688..e7d68299ce 100644
--- a/tests/data/test2404
+++ b/tests/data/test2404
@@ -102,7 +102,7 @@ Via: 2 nghttpx
* Connection #0 to host localhost left intact
-$_ = '' if (($_ !~ /left intact/) && ($_ !~ /Closing connection/))
+$_ = '' if(($_ !~ /left intact/) && ($_ !~ /Closing connection/))
diff --git a/tests/data/test2502 b/tests/data/test2502
index e53f880469..e86e6125ad 100644
--- a/tests/data/test2502
+++ b/tests/data/test2502
@@ -97,7 +97,7 @@ Via: 3 nghttpx
== Info: Connection #0 to host localhost left intact
-$_ = '' if (($_ !~ /left intact/) && ($_ !~ /Closing connection/))
+$_ = '' if(($_ !~ /left intact/) && ($_ !~ /Closing connection/))
diff --git a/tests/data/test8 b/tests/data/test8
index e231cd7eb7..5ed328bbed 100644
--- a/tests/data/test8
+++ b/tests/data/test8
@@ -79,7 +79,7 @@ Set-Cookie: cookie31=%hex[%7f-junk]hex%
-%PERL -e 'if ("%HOSTIP" !~ /\.0\.0\.1$/) {print "Test only works for HOSTIPs ending with .0.0.1"; exit(1)}'
+%PERL -e 'if("%HOSTIP" !~ /\.0\.0\.1$/) {print "Test only works for HOSTIPs ending with .0.0.1"; exit(1)}'
cookies
diff --git a/tests/data/test96 b/tests/data/test96
index e862b84a0c..426715a2cb 100644
--- a/tests/data/test96
+++ b/tests/data/test96
@@ -38,7 +38,7 @@ MEM tool_cfgable.c
MEM tool_cfgable.c
-$_ = '' if ((($_ !~ /tool_paramhlp/) && ($_ !~ /tool_cfgable/)) || ($_ =~ /free\(\(nil\)\)/))
+$_ = '' if((($_ !~ /tool_paramhlp/) && ($_ !~ /tool_cfgable/)) || ($_ =~ /free\(\(nil\)\)/))
s/:\d+.*//
s:^(MEM )(.*/)(.*):$1$3:
diff --git a/tests/libtest/test1013.pl b/tests/libtest/test1013.pl
index 79a6de409d..878077d80c 100755
--- a/tests/libtest/test1013.pl
+++ b/tests/libtest/test1013.pl
@@ -35,7 +35,7 @@ my $what=$ARGV[2];
my $curl_protocols="";
open(CURL, "$ARGV[1]") || die "Can't get curl $what list\n";
while() {
- $curl_protocols = $_ if ( /$what:/i );
+ $curl_protocols = $_ if(/$what:/i);
}
close CURL;
diff --git a/tests/libtest/test613.pl b/tests/libtest/test613.pl
index bff7b9ddb2..9abc0c41cd 100755
--- a/tests/libtest/test613.pl
+++ b/tests/libtest/test613.pl
@@ -36,8 +36,7 @@ sub errout {
exit 1;
}
-if($ARGV[0] eq "prepare")
-{
+if($ARGV[0] eq "prepare") {
my $dirname = $ARGV[1];
mkdir $dirname || errout "$!";
chdir $dirname;
@@ -71,8 +70,7 @@ if($ARGV[0] eq "prepare")
exit 0;
}
-elsif($ARGV[0] eq "postprocess")
-{
+elsif($ARGV[0] eq "postprocess") {
my $dirname = $ARGV[1];
my $logfile = $ARGV[2];
diff --git a/tests/pathhelp.pm b/tests/pathhelp.pm
index 571a4d5a67..1695825188 100644
--- a/tests/pathhelp.pm
+++ b/tests/pathhelp.pm
@@ -121,7 +121,7 @@ sub sys_native_abs_path {
return File::Spec->rel2abs($path) if !os_is_win();
# Do not process empty path.
- return $path if ($path eq '');
+ return $path if($path eq '');
my $res;
if($^O eq 'msys' || $^O eq 'cygwin') {
diff --git a/tests/runtests.pl b/tests/runtests.pl
index 37efc2a49b..70aee2a07d 100755
--- a/tests/runtests.pl
+++ b/tests/runtests.pl
@@ -305,7 +305,7 @@ delete $ENV{'CURL_CA_BUNDLE'} if($ENV{'CURL_CA_BUNDLE'});
# set by the caller
if(open(my $fd, "<", "config")) {
while(my $line = <$fd>) {
- next if ($line =~ /^#/);
+ next if($line =~ /^#/);
chomp $line;
my ($name, $val) = split(/\s*:\s*/, $line, 2);
$ENV{$name} = $val if(!$ENV{$name});
@@ -941,7 +941,7 @@ sub timestampskippedevents {
sub citest_starttestrun {
if(azure_check_environment()) {
$AZURE_RUN_ID = azure_create_test_run($ACURL);
- logmsg "Azure Run ID: $AZURE_RUN_ID\n" if ($verbose);
+ logmsg "Azure Run ID: $AZURE_RUN_ID\n" if($verbose);
}
# Appveyor doesn't require anything here
}
@@ -2294,7 +2294,7 @@ while(@ARGV) {
my $exclude_file = $ARGV[0];
open(my $fd, "<", $exclude_file) or die "Couldn't open '$exclude_file': $!";
while(my $line = <$fd>) {
- next if ($line =~ /^#/);
+ next if($line =~ /^#/);
chomp $line;
my ($type, $patterns, $skip_reason) = split(/\s*:\s*/, $line, 3);
@@ -2697,7 +2697,7 @@ sub disabledtests {
# fail hard to make user notice
exit 1;
}
- logmsg "DISABLED: test $n\n" if ($verbose);
+ logmsg "DISABLED: test $n\n" if($verbose);
}
else {
print STDERR "$file: rubbish content: $t\n";
diff --git a/tests/servers.pm b/tests/servers.pm
index c9cc4be24b..df32ca7e4e 100644
--- a/tests/servers.pm
+++ b/tests/servers.pm
@@ -166,7 +166,7 @@ sub checkcmd {
"/sbin", "/usr/bin", "/usr/local/bin", @extrapaths);
}
for(@paths) {
- if( -x "$_/$cmd" . exe_ext('SYS') && ! -d "$_/$cmd" . exe_ext('SYS')) {
+ if(-x "$_/$cmd" . exe_ext('SYS') && ! -d "$_/$cmd" . exe_ext('SYS')) {
# executable bit but not a directory!
return "$_/$cmd";
}
@@ -345,7 +345,7 @@ sub serverfortest {
sub startnew {
my ($cmd, $pidfile, $timeout, $fakepidfile)=@_;
- logmsg "startnew: $cmd\n" if ($verbose);
+ logmsg "startnew: $cmd\n" if($verbose);
my $child = fork();
@@ -504,7 +504,7 @@ sub stopserver {
foreach my $lockfile (@lockfiles) {
if(-f $lockfile) {
unlink($lockfile);
- logmsg "RUN: kill $server, cleaned up $lockfile\n" if ($verbose);
+ logmsg "RUN: kill $server, cleaned up $lockfile\n" if($verbose);
}
}
}
@@ -3029,7 +3029,7 @@ sub startservers {
}
}
elsif($what eq "none") {
- logmsg "* starts no server\n" if ($verbose);
+ logmsg "* starts no server\n" if($verbose);
}
else {
warn "we don't support a server for $what";
diff --git a/tests/test1119.pl b/tests/test1119.pl
index ed8247ce0c..d1cdf4e11c 100755
--- a/tests/test1119.pl
+++ b/tests/test1119.pl
@@ -67,8 +67,8 @@ my %rem;
sub scanenum {
my ($file) = @_;
open my $h_in, "-|", "$Cpreprocessor $i$file" || die "Cannot preprocess $file";
- while( <$h_in> ) {
- if( /enum\s+(\S+\s+)?{/ .. /}/ ) {
+ while(<$h_in>) {
+ if(/enum\s+(\S+\s+)?{/ .. /}/) {
s/^\s+//;
next unless /^CURL/;
chomp;
diff --git a/tests/test1135.pl b/tests/test1135.pl
index 0005c69309..b64e4bf8a8 100755
--- a/tests/test1135.pl
+++ b/tests/test1135.pl
@@ -22,8 +22,6 @@
# SPDX-License-Identifier: curl
#
###########################################################################
-#
-#
use strict;
use warnings;
diff --git a/tests/test1139.pl b/tests/test1139.pl
index 8b2a5b623f..cabb893d69 100755
--- a/tests/test1139.pl
+++ b/tests/test1139.pl
@@ -202,7 +202,7 @@ while(<$r>) {
$list=1;
}
elsif($list) {
- if( /^ \{(\"[^,]*\").*\'(.)\',/) {
+ if(/^ \{(\"[^,]*\").*\'(.)\',/) {
my ($l, $s)=($1, $2);
my $sh;
my $lo;
diff --git a/tests/test1165.pl b/tests/test1165.pl
index 61fe5c184d..a15071c256 100755
--- a/tests/test1165.pl
+++ b/tests/test1165.pl
@@ -22,7 +22,6 @@
# SPDX-License-Identifier: curl
#
###########################################################################
-#
use strict;
use warnings;
diff --git a/tests/test1167.pl b/tests/test1167.pl
index f38d211cce..e2965b784a 100755
--- a/tests/test1167.pl
+++ b/tests/test1167.pl
@@ -76,7 +76,7 @@ sub scanenums {
die "Cannot preprocess $file";
while() {
my ($line, $linenum) = ($_, $.);
- if( /^#(line|) (\d+) \"(.*)\"/) {
+ if(/^#(line|) (\d+) \"(.*)\"/) {
# if the included file isn't in our incdir, then we skip this section
# until next #line
#
@@ -94,7 +94,7 @@ sub scanenums {
if(/^#/) {
next;
}
- if( /enum\s+(\S+\s+)?{/ .. /}/ ) {
+ if(/enum\s+(\S+\s+)?{/ .. /}/) {
s/^\s+//;
chomp;
s/[,\s].*//;
diff --git a/tests/test1173.pl b/tests/test1173.pl
index 6a096d691e..2faf472308 100755
--- a/tests/test1173.pl
+++ b/tests/test1173.pl
@@ -107,7 +107,7 @@ sub checkref {
return;
}
foreach my $d (keys %docsdirs) {
- if( -f "$d/$f.$sec") {
+ if(-f "$d/$f.$sec") {
$present = 1;
$ref{"$f.$sec"}=1;
last;
diff --git a/tests/test1175.pl b/tests/test1175.pl
index 2bf863fc7a..c981046b7e 100755
--- a/tests/test1175.pl
+++ b/tests/test1175.pl
@@ -22,8 +22,6 @@
# SPDX-License-Identifier: curl
#
###########################################################################
-#
-#
use strict;
use warnings;
diff --git a/tests/test1486.pl b/tests/test1486.pl
index 99aa1574c7..4ff55c3b12 100755
--- a/tests/test1486.pl
+++ b/tests/test1486.pl
@@ -22,8 +22,6 @@
# SPDX-License-Identifier: curl
#
###########################################################################
-#
-#
use strict;
use warnings;
diff --git a/tests/test1488.pl b/tests/test1488.pl
index 7038f58696..a8f998845e 100755
--- a/tests/test1488.pl
+++ b/tests/test1488.pl
@@ -127,14 +127,12 @@ close $s;
my $ignored=0;
for my $e (sort @syms) {
- if( $manpage{$e} ) {
-
- if( $manpage{$e} ne $symadded{$e} ) {
+ if($manpage{$e}) {
+ if($manpage{$e} ne $symadded{$e}) {
printf "%s.md says version %s, but SIV says %s\n",
$e, $manpage{$e}, $symadded{$e};
$error++;
}
-
}
}
print "OK\n" if(!$error);
diff --git a/tests/test745.pl b/tests/test745.pl
index acb89fa5cf..02ed3be5c3 100755
--- a/tests/test745.pl
+++ b/tests/test745.pl
@@ -22,8 +22,6 @@
# SPDX-License-Identifier: curl
#
###########################################################################
-#
-#
use strict;
use warnings;
diff --git a/tests/test971.pl b/tests/test971.pl
index d5c573ed94..8669145000 100755
--- a/tests/test971.pl
+++ b/tests/test971.pl
@@ -23,7 +23,6 @@
#
###########################################################################
#
-#
# - Get all options mentioned in the $cmddir.
# - Make sure they're all mentioned in the $opts document
# - Make sure that the version in $opts matches the version in the file in
diff --git a/tests/testcurl.pl b/tests/testcurl.pl
index 514bf1cab4..791e366257 100755
--- a/tests/testcurl.pl
+++ b/tests/testcurl.pl
@@ -177,8 +177,8 @@ if(($^O eq 'MSWin32' || $^O eq 'cygwin' || $^O eq 'msys') &&
$confheader = 'config-win32.h';
}
-$ENV{LC_ALL}="C" if (($ENV{LC_ALL}) && ($ENV{LC_ALL} !~ /^C$/));
-$ENV{LC_CTYPE}="C" if (($ENV{LC_CTYPE}) && ($ENV{LC_CTYPE} !~ /^C$/));
+$ENV{LC_ALL}="C" if(($ENV{LC_ALL}) && ($ENV{LC_ALL} !~ /^C$/));
+$ENV{LC_CTYPE}="C" if(($ENV{LC_CTYPE}) && ($ENV{LC_CTYPE} !~ /^C$/));
$ENV{LANG}="C";
sub rmtree($) {
@@ -371,11 +371,11 @@ if(-d $CURLDIR) {
# time we run this test
unlink "$CURLDIR/src/tool_hugehelp.c";
# find out if curl source dir has an in-tree c-ares repo
- $have_embedded_ares = 1 if (-f "$CURLDIR/ares/GIT-INFO");
+ $have_embedded_ares = 1 if(-f "$CURLDIR/ares/GIT-INFO");
} elsif(!$git && -f "$CURLDIR/tests/testcurl.pl") {
logit "$CURLDIR is verified to be a fine daily source dir";
# find out if curl source dir has an in-tree c-ares extracted tarball
- $have_embedded_ares = 1 if (-f "$CURLDIR/ares/ares_build.h");
+ $have_embedded_ares = 1 if(-f "$CURLDIR/ares/ares_build.h");
} else {
mydie "$CURLDIR is not a daily source dir or checked out from git!"
}
@@ -419,10 +419,10 @@ if($git) {
logit "run git pull in curl";
system("git pull 2>&1");
$gitstat += $?;
- logit "failed to update from curl git ($?), continue anyway" if ($?);
+ logit "failed to update from curl git ($?), continue anyway" if($?);
# Set timestamp to the UTC the git update took place.
- $timestamp = scalar(gmtime)." UTC" if (!$gitstat);
+ $timestamp = scalar(gmtime)." UTC" if(!$gitstat);
}
# get the last 5 commits for show (even if no pull was made)
@@ -442,10 +442,10 @@ if($git) {
logit "run git pull in ares";
system("git pull 2>&1");
$gitstat += $?;
- logit "failed to update from ares git ($?), continue anyway" if ($?);
+ logit "failed to update from ares git ($?), continue anyway" if($?);
# Set timestamp to the UTC the git update took place.
- $timestamp = scalar(gmtime)." UTC" if (!$gitstat);
+ $timestamp = scalar(gmtime)." UTC" if(!$gitstat);
}
# get the last 5 commits for show (even if no pull was made)
@@ -535,7 +535,7 @@ sub findinpath {
my @pa = split($s, $p);
for $c (@_) {
for $e (@pa) {
- if( -x "$e/$c$x") {
+ if(-x "$e/$c$x") {
return $c;
}
}
@@ -547,7 +547,7 @@ if(!$make) {
mydie "Couldn't find make in the PATH";
}
# force to 'nmake' for VC builds
-$make = "nmake" if ($targetos =~ /vc/);
+$make = "nmake" if($targetos =~ /vc/);
logit "going with $make as make";
# change to build dir
@@ -683,7 +683,7 @@ if(!$crosscompile || (($extvercmd ne '') && (-x $extvercmd))) {
open($f, "<", $cmd);
while(<$f>) {
# strip CR from output on non-Windows platforms (WINE on Linux)
- s/\r// if ($^O ne 'MSWin32');
+ s/\r// if($^O ne 'MSWin32');
print;
}
close($f);