]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
runtests: allow <strippart> to remove lines
authorDaniel Stenberg <daniel@haxx.se>
Sat, 8 Feb 2014 22:19:10 +0000 (23:19 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Sat, 8 Feb 2014 22:19:10 +0000 (23:19 +0100)
For verify file, if the strippart condition removes the line completely
it is now removed from the array.

tests/runtests.pl

index 0de76e3d1d0ae54bfe511bcd7e05c86dcc6b4406..8a47d5853ac6e10f7a22b2fea100ff984e1aaddd 100755 (executable)
@@ -3809,9 +3809,16 @@ sub singletest {
             my $strip;
             for $strip (@stripfile) {
                 chomp $strip;
+                my @newgen;
                 for(@generated) {
                     eval $strip;
+                    if($_) {
+                        push @newgen, $_;
+                    }
                 }
+                # this is to get rid of array entries that vanished (zero
+                # length) because of replacements
+                @generated = @newgen;
             }
 
             @outfile = fixarray(@outfile);