Variables are substituted as in the <command> section.
</file>
<stripfile>
-One perl op per line that operates on the file before being compared. This is
-pretty advanced. Example: "s/^EPRT .*/EPRT stripped/"
+One perl op per line that operates on the output file or stdout before being
+compared with what is stored in the test file. This is pretty
+advanced. Example: "s/^EPRT .*/EPRT stripped/"
</stripfile>
<upload>
the contents of the upload data curl should have sent
HTTP/2 GET with Upgrade:
</name>
<command>
-http://%HOSTIP:9015/1700 --http2 http://%HOSTIP:9015/17000001
+http://%HOSTIP:%HTTP2PORT/1700 --http2 http://%HOSTIP:%HTTP2PORT/17000001
</command>
</client>
</strip>
<protocol>
GET /1700 HTTP/1.1\r
-Host: %HOSTIP:9015\r
+Host: %HOSTIP:%HTTP2PORT\r
Accept: */*\r
\r
GET /17000001 HTTP/1.1\r
-Host: %HOSTIP:9015\r
+Host: %HOSTIP:%HTTP2PORT\r
Accept: */*\r
\r
</protocol>
content-length: 6\r
content-type: text/html\r
funny-head: yesyes\r
-server: nghttpx nghttp2/1.12.0-DEV\r
+server: cut-out\r
via: 1.1 nghttpx\r
\r
-foo-
date: Thu, 09 Nov 2010 14:49:00 GMT\r
content-length: 6\r
content-type: text/html\r
-server: nghttpx nghttp2/1.12.0-DEV\r
+server: cut-out\r
via: 1.1 nghttpx\r
\r
-maa-
</stdout>
+<stripfile>
+s/^server:.*/server: cut-out\r/
+</stripfile>
</verify>
</testcase>
"--pid-file=$pidfile ".
"--errorlog-file=$logfile";
print "RUN: $cmdline\n" if($verbose);
-system("$cmdline");
+system("$cmdline 2>/dev/null");
# 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);