MSVC: Avoid warning when testing a TAP suite without PROVE_FLAGS.
authorNoah Misch <[email protected]>
Sun, 7 Jun 2020 23:27:13 +0000 (16:27 -0700)
committerNoah Misch <[email protected]>
Sun, 7 Jun 2020 23:27:18 +0000 (16:27 -0700)
Commit 7be5d8df1f74b78620167d3abf32ee607e728919 surfaced the logic
error, which had no functional implications, by adding "use warnings".
The buildfarm always customizes PROVE_FLAGS, so the warning did not
appear there.  Back-patch to 9.5 (all supported versions).

src/tools/msvc/vcregress.pl

index 155f83583267691664eb553c83331b202d8a6bba..4432c7cb73af0b8d847ade58a21f0b7764dc80bf 100644 (file)
@@ -190,7 +190,7 @@ sub tap_check
      unless $config->{tap_tests};
 
    my @flags;
-   foreach my $arg (0 .. scalar(@_))
+   foreach my $arg (0 .. scalar(@_) - 1)
    {
        next unless $_[$arg] =~ /^PROVE_FLAGS=(.*)/;
        @flags = split(/\s+/, $1);