]> Sergey Matveev's repositories - public-inbox.git/blobdiff - t/run.perl
update copyrights for 2021
[public-inbox.git] / t / run.perl
index 1c7bcfc34db6fc3a24f28e468ee3d0d2f6f0827c..b7cb988be3e9b1f123ed484d0fc2ddc0b8e1e128 100755 (executable)
@@ -1,5 +1,5 @@
 #!/usr/bin/perl -w
-# Copyright (C) 2019-2020 all contributors <meta@public-inbox.org>
+# Copyright (C) 2019-2021 all contributors <meta@public-inbox.org>
 # License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
 #
 # Parallel test runner which preloads code and reuses worker processes
@@ -71,7 +71,8 @@ sub test_status () {
                my $skip = '';
                if (open my $fh, '<', $log) {
                        my @not_ok = grep(!/^(?:ok |[ \t]*#)/ms, <$fh>);
-                       pop @not_ok if $not_ok[-1] =~ /^[0-9]+\.\.[0-9]+$/;
+                       my $last = $not_ok[-1] // '';
+                       pop @not_ok if $last =~ /^[0-9]+\.\.[0-9]+$/;
                        my $pfx = "# $log: ";
                        print $OLDERR map { $pfx.$_ } @not_ok;
                        seek($fh, 0, SEEK_SET) or die "seek: $!";