From d3b5c153af6998e2fd64bfc2b3033b2b5526a8cf Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Fri, 3 Jun 2016 23:54:06 +0200 Subject: runtests: make stripfile work on stdout as well ... and have test 1700 use that to strip out the nghttpx server: headers --- tests/runtests.pl | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'tests/runtests.pl') 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); -- cgit v1.2.3