summaryrefslogtreecommitdiff
path: root/tests/runtests.pl
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2016-06-03 23:54:06 +0200
committerDaniel Stenberg <daniel@haxx.se>2016-06-06 23:51:49 +0200
commitd3b5c153af6998e2fd64bfc2b3033b2b5526a8cf (patch)
tree68707b312b89e056835f0ceb7ce368aa35784c8e /tests/runtests.pl
parentbf05606ef1f7a982c821396c3ef9fddeb4a1b011 (diff)
downloadcurl-d3b5c153af6998e2fd64bfc2b3033b2b5526a8cf.tar.gz
runtests: make stripfile work on stdout as well
... and have test 1700 use that to strip out the nghttpx server: headers
Diffstat (limited to 'tests/runtests.pl')
-rwxr-xr-xtests/runtests.pl17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/runtests.pl b/tests/runtests.pl
index 42d791097..7c7dc8d01 100755
--- a/tests/runtests.pl
+++ b/tests/runtests.pl
@@ -3841,6 +3841,23 @@ sub singletest {
# verify redirected stdout
my @actual = loadarray($STDOUT);
+ # what parts to cut off from stdout
+ my @stripfile = getpart("verify", "stripfile");
+
+ foreach my $strip (@stripfile) {
+ chomp $strip;
+ my @newgen;
+ for(@actual) {
+ eval $strip;
+ if($_) {
+ push @newgen, $_;
+ }
+ }
+ # this is to get rid of array entries that vanished (zero
+ # length) because of replacements
+ @actual = @newgen;
+ }
+
# variable-replace in the stdout we have from the test case file
@validstdout = fixarray(@validstdout);