summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2017-05-08 10:08:48 +0200
committerDaniel Stenberg <daniel@haxx.se>2017-05-08 10:09:06 +0200
commite3f84efc32d6b01a605c93b39668653049c15188 (patch)
treef1a0887c2768e14f550d414bec1f9b2f154ff0b1
parente2b394106d543c4615a60795b7fdce04bd4e5090 (diff)
downloadcurl-e3f84efc32d6b01a605c93b39668653049c15188.tar.gz
runtests: fix "use of undefined value" warning in -R handling
-rwxr-xr-xtests/runtests.pl6
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/runtests.pl b/tests/runtests.pl
index 48e26142f..d20383ae8 100755
--- a/tests/runtests.pl
+++ b/tests/runtests.pl
@@ -5179,7 +5179,11 @@ if($scrambleorder) {
# scramble the order of the test cases
my @rand;
while($TESTCASES) {
- my @all = split(/ /, $TESTCASES);
+ my @all = split(/ +/, $TESTCASES);
+ if(!$all[0]) {
+ # if the first is blank, shift away it
+ shift @all;
+ }
my $r = rand @all;
push @rand, $all[$r];
$all[$r]="";