xref: /curl/tests/FILEFORMAT.md (revision cbafcec5)
1<!--
2Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
3
4SPDX-License-Identifier: curl
5-->
6
7# curl test suite file format
8
9The curl test suite's file format is simple and extendable, closely resembling
10XML. All data for a single test case resides in a single ASCII file. Labels
11mark the beginning and the end of all sections, and each label must be written
12in its own line. Comments are either XML-style (enclosed with `<!--` and
13`-->`) or shell script style (beginning with `#`) and must appear on their own
14lines and not alongside actual test data. Most test data files are
15syntactically valid XML, although a few files are not (lack of support for
16character entities and the preservation of CR/LF characters at the end of
17lines are the biggest differences).
18
19Each test case source exists as a file matching the format
20`tests/data/testNUM`, where `NUM` is the unique test number, and must begin
21with a `testcase` tag, which encompasses the remainder of the file.
22
23# Preprocessing
24
25When a test is to be executed, the source file is first preprocessed and
26variables are substituted by their respective contents and the output version
27of the test file is stored as `%LOGDIR/testNUM`. That version is what is read
28and used by the test servers.
29
30## Base64 Encoding
31
32In the preprocess stage, a special instruction can be used to have runtests.pl
33base64 encode a certain section and insert in the generated output file. This
34is in particular good for test cases where the test tool is expected to pass
35in base64 encoded content that might use dynamic information that is unique
36for this particular test invocation, like the server port number.
37
38To insert a base64 encoded string into the output, use this syntax:
39
40    %b64[ data to encode ]b64%
41
42The data to encode can then use any of the existing variables mentioned below,
43or even percent-encoded individual bytes. As an example, insert the HTTP
44server's port number (in ASCII) followed by a space and the hexadecimal byte
459a:
46
47    %b64[%HTTPPORT %9a]b64%
48
49## Hexadecimal decoding
50
51In the preprocess stage, a special instruction can be used to have runtests.pl
52generate a sequence of binary bytes.
53
54To insert a sequence of bytes from a hex encoded string, use this syntax:
55
56    %hex[ %XX-encoded data to decode ]hex%
57
58For example, to insert the binary octets 0, 1 and 255 into the test file:
59
60    %hex[ %00%01%FF ]hex%
61
62## Repeat content
63
64In the preprocess stage, a special instruction can be used to have runtests.pl
65generate a repetitive sequence of bytes.
66
67To insert a sequence of repeat bytes, use this syntax to make the `<string>`
68get repeated `<number>` of times. The number has to be 1 or larger and the
69string may contain `%HH` hexadecimal codes:
70
71    %repeat[<number> x <string>]%
72
73For example, to insert the word hello 100 times:
74
75    %repeat[100 x hello]%
76
77## Include file
78
79This instruction allows a test case to include another file. It is helpful to
80remember that the ordinary variables are expanded before the include happens
81so `%LOGDIR` and the others can be used in the include line.
82
83The filename cannot contain `%` as that letter is used to end the name for
84the include instruction:
85
86    %include filename%
87
88## Conditional lines
89
90Lines in the test file can be made to appear conditionally on a specific
91feature (see the "features" section below) being set or not set. If the
92specific feature is present, the following lines are output, otherwise it
93outputs nothing, until a following else or `endif` clause. Like this:
94
95    %if brotli
96    Accept-Encoding
97    %endif
98
99It can also check for the inverse condition, so if the feature is *not* set by
100the use of an exclamation mark:
101
102    %if !brotli
103    Accept-Encoding: not-brotli
104    %endif
105
106You can also make an "else" clause to get output for the opposite condition,
107like:
108
109    %if brotli
110    Accept-Encoding: brotli
111    %else
112    Accept-Encoding: nothing
113    %endif
114
115Nested conditions are supported.
116
117# Variables
118
119When the test is preprocessed, a range of "variables" in the test file is
120replaced by their content at that time.
121
122Available substitute variables include:
123
124- `%CLIENT6IP` - IPv6 address of the client running curl (including brackets)
125- `%CLIENT6IP-NB` - IPv6 address of the client running curl (no brackets)
126- `%CLIENTIP` - IPv4 address of the client running curl
127- `%CURL` - Path to the curl executable
128- `%DATE` - current YYYY-MM-DD date
129- `%DEV_NULL` - Null device (e.g. /dev/null)
130- `%FILE_PWD` - Current directory, on Windows prefixed with a slash
131- `%FTP6PORT` - IPv6 port number of the FTP server
132- `%FTPPORT` - Port number of the FTP server
133- `%FTPSPORT` - Port number of the FTPS server
134- `%FTPTIME2` - Timeout in seconds that should be just sufficient to receive a
135  response from the test FTP server
136- `%GOPHER6PORT` - IPv6 port number of the Gopher server
137- `%GOPHERPORT` - Port number of the Gopher server
138- `%GOPHERSPORT` - Port number of the Gophers server
139- `%HOST6IP` - IPv6 address of the host running this test
140- `%HOSTIP` - IPv4 address of the host running this test
141- `%HTTP2PORT` - Port number of the HTTP/2 server
142- `%HTTP6PORT` - IPv6 port number of the HTTP server
143- `%HTTPPORT` - Port number of the HTTP server
144- `%HTTPSPORT` - Port number of the HTTPS server
145- `%HTTPSPROXYPORT` - Port number of the HTTPS-proxy
146- `%HTTPTLS6PORT` - IPv6 port number of the HTTP TLS server
147- `%HTTPTLSPORT` - Port number of the HTTP TLS server
148- `%HTTPUNIXPATH` - Path to the Unix socket of the HTTP server
149- `%IMAP6PORT` - IPv6 port number of the IMAP server
150- `%IMAPPORT` - Port number of the IMAP server
151- `%LOGDIR` - Log directory relative to %PWD
152- `%MQTTPORT` - Port number of the MQTT server
153- `%NOLISTENPORT` - Port number where no service is listening
154- `%POP36PORT` - IPv6 port number of the POP3 server
155- `%POP3PORT` - Port number of the POP3 server
156- `%POSIX_PWD` - Current directory somewhat MinGW friendly
157- `%PROXYPORT` - Port number of the HTTP proxy
158- `%PWD` - Current directory
159- `%RTSP6PORT` - IPv6 port number of the RTSP server
160- `%RTSPPORT` - Port number of the RTSP server
161- `%SMBPORT` - Port number of the SMB server
162- `%SMBSPORT` - Port number of the SMBS server
163- `%SMTP6PORT` - IPv6 port number of the SMTP server
164- `%SMTPPORT` - Port number of the SMTP server
165- `%SOCKSPORT` - Port number of the SOCKS4/5 server
166- `%SOCKSUNIXPATH` - Path to the Unix socket of the SOCKS server
167- `%SRCDIR` - Full path to the source dir
168- `%SSH_PWD` - Current directory friendly for the SSH server
169- `%SSHPORT` - Port number of the SCP/SFTP server
170- `%SSHSRVMD5` - MD5 of SSH server's public key
171- `%SSHSRVSHA256` - SHA256 of SSH server's public key
172- `%TELNETPORT` - Port number of the telnet server
173- `%TESTNUMBER` - Number of the test case
174- `%TFTP6PORT` - IPv6 port number of the TFTP server
175- `%TFTPPORT` - Port number of the TFTP server
176- `%USER` - Login ID of the user running the test
177- `%VERNUM` - the version number of the tested curl (without -DEV)
178- `%VERSION` - the full version number of the tested curl
179
180# `<testcase>`
181
182Each test is always specified entirely within the `testcase` tag. Each test
183case is split up in four main sections: `info`, `reply`, `client` and
184`verify`.
185
186- **info** provides information about the test case
187
188- **reply** is used for the server to know what to send as a reply for the
189requests curl sends
190
191- **client** defines how the client should behave
192
193- **verify** defines how to verify that the data stored after a command has
194been run ended up correct
195
196Each main section has a number of available subsections that can be specified,
197that are checked/used if specified.
198
199## `<info>`
200
201### `<keywords>`
202A newline-separated list of keywords describing what this test case uses and
203tests. Try to use already used keywords. These keywords are used for
204statistical/informational purposes and for choosing or skipping classes of
205tests. Keywords must begin with an alphabetic character, `-`, `[` or `{` and
206may actually consist of multiple words separated by spaces which are treated
207together as a single identifier. Most keywords are only there to provide a way
208for users to skip certain classes of tests, if desired, but a few are treated
209specially by the test harness or build system.
210
211When using curl built with Hyper, the keywords must include `HTTP` or `HTTPS`
212for 'hyper mode' to kick in and make line ending checks work for tests.
213
214When running a unit test and the keywords include `unittest`, the `<tool>`
215section can be left empty to use the standard unit test tool name `unitN` where
216`N` is the test number.
217
218The `text-ci` make target automatically skips test with the `flaky` keyword.
219
220Tests that have strict timing dependencies have the `timing-dependent` keyword.
221These are intended to eventually be treated specially on CI builds which are
222often run on overloaded machines with unpredictable timing.
223
224## `<reply>`
225
226### `<data [nocheck="yes"] [sendzero="yes"] [base64="yes"] [hex="yes"] [nonewline="yes"] [crlf="yes"]>`
227
228data to be sent to the client on its request and later verified that it
229arrived safely. Set `nocheck="yes"` to prevent the test script from verifying
230the arrival of this data.
231
232If the data contains `swsclose` anywhere within the start and end tag, and
233this is an HTTP test, then the connection is closed by the server after this
234response is sent. If not, the connection is kept persistent.
235
236If the data contains `swsbounce` anywhere within the start and end tag, the
237HTTP server detects if this is a second request using the same test and part
238number and then increases the part number with one. This is useful for auth
239tests and similar.
240
241`sendzero=yes` means that the (FTP) server "sends" the data even if the size
242is zero bytes. Used to verify curl's behavior on zero bytes transfers.
243
244`base64=yes` means that the data provided in the test-file is a chunk of data
245encoded with base64. It is the only way a test case can contain binary
246data. (This attribute can in fact be used on any section, but it does not make
247much sense for other sections than "data").
248
249`hex=yes` means that the data is a sequence of hex pairs. It gets decoded and
250used as "raw" data.
251
252`nonewline=yes` means that the last byte (the trailing newline character)
253should be cut off from the data before sending or comparing it.
254
255`crlf=yes` forces *header* newlines to become CRLF even if not written so in
256the source file. Note that this makes runtests.pl parse and "guess" what is a
257header and what is not in order to apply the CRLF line endings appropriately.
258
259For FTP file listings, the `<data>` section is be used *only* if you make sure
260that there has been a CWD done first to a directory named `test-[NUM]` where
261`NUM` is the test case number. Otherwise the ftp server cannot know from which
262test file to load the list content.
263
264### `<dataNUM [crlf="yes"]>`
265
266Send back this contents instead of the `<data>` one. The `NUM` is set by:
267
268 - The test number in the request line is >10000 and this is the remainder
269   of [test case number]%10000.
270 - The request was HTTP and included digest details, which adds 1000 to `NUM`
271 - If an HTTP request is NTLM type-1, it adds 1001 to `NUM`
272 - If an HTTP request is NTLM type-3, it adds 1002 to `NUM`
273 - If an HTTP request is Basic and `NUM` is already >=1000, it adds 1 to `NUM`
274 - If an HTTP request is Negotiate, `NUM` gets incremented by one for each
275   request with Negotiate authorization header on the same test case.
276
277Dynamically changing `NUM` in this way allows the test harness to be used to
278test authentication negotiation where several different requests must be sent
279to complete a transfer. The response to each request is found in its own data
280section. Validating the entire negotiation sequence can be done by specifying
281a `datacheck` section.
282
283### `<connect>`
284The connect section is used instead of the 'data' for all CONNECT
285requests. The remainder of the rules for the data section then apply but with
286a connect prefix.
287
288### `<socks>`
289Address type and address details as logged by the SOCKS proxy.
290
291### `<datacheck [mode="text"] [nonewline="yes"] [crlf="yes"]>`
292if the data is sent but this is what should be checked afterwards. If
293`nonewline=yes` is set, runtests cuts off the trailing newline from the data
294before comparing with the one actually received by the client.
295
296Use the `mode="text"` attribute if the output is in text mode on platforms
297that have a text/binary difference.
298
299### `<datacheckNUM [nonewline="yes"] [mode="text"] [crlf="yes"]>`
300The contents of numbered `datacheck` sections are appended to the non-numbered
301one.
302
303### `<size>`
304number to return on an ftp SIZE command (set to -1 to make this command fail)
305
306### `<mdtm>`
307what to send back if the client sends a (FTP) `MDTM` command, set to -1 to
308have it return that the file does not exist
309
310### `<postcmd>`
311special purpose server-command to control its behavior *after* the
312reply is sent
313For HTTP/HTTPS, these are supported:
314
315`wait [secs]` - Pause for the given time
316
317### `<servercmd>`
318Special-commands for the server.
319
320The first line of this file is always set to `Testnum [number]` by the test
321script, to allow servers to read that to know what test the client is about to
322issue.
323
324#### For FTP/SMTP/POP/IMAP
325
326- `REPLY [command] [return value] [response string]` - Changes how the server
327  responds to the [command]. [response string] is evaluated as a perl string,
328  so it can contain embedded \r\n, for example. There is a special [command]
329  named "welcome" (without quotes) which is the string sent immediately on
330  connect as a welcome.
331- `REPLYLF` (like above but sends the response terminated with LF-only and not
332   CRLF)
333- `COUNT [command] [num]` - Do the `REPLY` change for `[command]` only `[num]`
334  times and then go back to the built-in approach
335- `DELAY [command] [secs]` - Delay responding to this command for the given
336  time
337- `RETRWEIRDO` - Enable the "weirdo" RETR case when multiple response lines
338   appear at once when a file is transferred
339- `RETRNOSIZE` - Make sure the RETR response does not contain the size of the
340  file
341- `RETRSIZE [size]` - Force RETR response to contain the specified size
342- `NOSAVE` - Do not actually save what is received
343- `SLOWDOWN` - Send FTP responses with 0.01 sec delay between each byte
344- `SLOWDOWNDATA` - Send FTP responses with 0.01 sec delay between each data
345  byte
346- `PASVBADIP` - makes PASV send back an illegal IP in its 227 response
347- `CAPA [capabilities]` - Enables support for and specifies a list of space
348   separated capabilities to return to the client for the IMAP `CAPABILITY`,
349   POP3 `CAPA` and SMTP `EHLO` commands
350- `AUTH [mechanisms]` - Enables support for SASL authentication and specifies
351   a list of space separated mechanisms for IMAP, POP3 and SMTP
352- `STOR [msg]` respond with this instead of default after `STOR`
353
354#### For HTTP/HTTPS
355
356- `auth_required` if this is set and a POST/PUT is made without auth, the
357  server does NOT wait for the full request body to get sent
358- `delay: [msecs]` - delay this amount after connection
359- `idle` - do nothing after receiving the request, just "sit idle"
360- `stream` - continuously send data to the client, never-ending
361- `writedelay: [msecs]` delay this amount between reply packets
362- `skip: [num]` - instructs the server to ignore reading this many bytes from
363  a PUT or POST request
364- `rtp: part [num] channel [num] size [num]` - stream a fake RTP packet for
365  the given part on a chosen channel with the given payload size
366- `connection-monitor` - When used, this logs `[DISCONNECT]` to the
367  `server.input` log when the connection is disconnected.
368- `upgrade` - when an HTTP upgrade header is found, the server upgrades to
369  http2
370- `swsclose` - instruct server to close connection after response
371- `no-expect` - do not read the request body if Expect: is present
372
373#### For TFTP
374`writedelay: [secs]` delay this amount between reply packets (each packet
375  being 512 bytes payload)
376
377## `<client>`
378
379### `<server>`
380What server(s) this test case requires/uses. Available servers:
381
382- `dict`
383- `file`
384- `ftp`
385- `ftp-ipv6`
386- `ftps`
387- `gopher`
388- `gopher-ipv6`
389- `gophers`
390- `http`
391- `http/2`
392- `http-ipv6`
393- `http-proxy`
394- `https`
395- `https-proxy`
396- `httptls+srp`
397- `httptls+srp-ipv6`
398- `http-unix`
399- `imap`
400- `mqtt`
401- `none`
402- `pop3`
403- `rtsp`
404- `rtsp-ipv6`
405- `scp`
406- `sftp`
407- `smb`
408- `smtp`
409- `socks4`
410- `socks5`
411- `socks5unix`
412- `telnet`
413- `tftp`
414
415Give only one per line. This subsection is mandatory (use `none` if no servers
416are required). Servers that require a special server certificate can have the
417PEM certificate filename (found in the `certs` directory) appended to the
418server name separated by a space.
419
420### `<features>`
421A list of features that MUST be present in the client/library for this test to
422be able to run. If a required feature is not present then the test is SKIPPED.
423
424Alternatively a feature can be prefixed with an exclamation mark to indicate a
425feature is NOT required. If the feature is present then the test is SKIPPED.
426
427Features testable here are:
428
429- `alt-svc`
430- `AppleIDN`
431- `bearssl`
432- `brotli`
433- `c-ares`
434- `CharConv`
435- `codeset-utf8`. If the running codeset is UTF-8 capable.
436- `cookies`
437- `crypto`
438- `Debug`
439- `DoH`
440- `getrlimit`
441- `GnuTLS`
442- `GSS-API`
443- `h2c`
444- `headers-api`
445- `HSTS`
446- `HTTP-auth`
447- `http/2`
448- `http/3`
449- `HTTPS-proxy`
450- `hyper`
451- `IDN`
452- `IPv6`
453- `Kerberos`
454- `Largefile`
455- `large-time` (time_t is larger than 32-bit)
456- `ld_preload`
457- `libssh2`
458- `libssh`
459- `oldlibssh` (versions before 0.9.4)
460- `libz`
461- `local-http`. The HTTP server runs on 127.0.0.1
462- `manual`
463- `mbedtls`
464- `Mime`
465- `netrc`
466- `nghttpx`
467- `nghttpx-h3`
468- `NTLM`
469- `NTLM_WB`
470- `OpenSSL`
471- `parsedate`
472- `proxy`
473- `PSL`
474- `rustls`
475- `Schannel`
476- `sectransp`
477- `shuffle-dns`
478- `socks`
479- `SPNEGO`
480- `SSL`
481- `SSLpinning`
482- `SSPI`
483- `threaded-resolver`
484- `TLS-SRP`
485- `TrackMemory`
486- `typecheck`
487- `threadsafe`
488- `Unicode`
489- `unittest`
490- `UnixSockets`
491- `verbose-strings`
492- `wakeup`
493- `win32`
494- `WinIDN`
495- `wolfssh`
496- `wolfssl`
497- `xattr`
498- `zstd`
499
500as well as each protocol that curl supports. A protocol only needs to be
501specified if it is different from the server (useful when the server is
502`none`).
503
504### `<killserver>`
505Using the same syntax as in `<server>` but when mentioned here these servers
506are explicitly KILLED when this test case is completed. Only use this if there
507is no other alternatives. Using this of course requires subsequent tests to
508restart servers.
509
510### `<precheck>`
511A command line that if set gets run by the test script before the test. If an
512output is displayed by the command or if the return code is non-zero, the test
513is skipped and the (single-line) output is displayed as reason for not running
514the test.
515
516### `<tool>`
517Name of tool to invoke instead of "curl". This tool must be built and exist
518either in the `libtest/` directory (if the tool name starts with `lib`) or in
519the `unit/` directory (if the tool name starts with `unit`).
520
521### `<name>`
522Brief test case description, shown when the test runs.
523
524### `<setenv>`
525
526    variable1=contents1
527    variable2=contents2
528    variable3
529
530Set the given environment variables to the specified value before the actual
531command is run. They are restored back to their former values again after the
532command has been run.
533
534If the variable name has no assignment, no `=`, then that variable is just
535deleted.
536
537### `<command [option="no-q/no-output/no-include/force-output/binary-trace"] [timeout="secs"][delay="secs"][type="perl/shell"]>`
538Command line to run.
539
540Note that the URL that gets passed to the server actually controls what data
541that is returned. The last slash in the URL must be followed by a number. That
542number (N) is used by the test-server to load test case N and return the data
543that is defined within the `<reply><data></data></reply>` section.
544
545If there is no test number found above, the HTTP test server uses the number
546following the last dot in the given hostname (made so that a CONNECT can still
547pass on test number) so that "foo.bar.123" gets treated as test case
548123. Alternatively, if an IPv6 address is provided to CONNECT, the last
549hexadecimal group in the address is used as the test number. For example the
550address "[1234::ff]" would be treated as test case 255.
551
552Set `type="perl"` to write the test case as a perl script. It implies that
553there is no memory debugging and valgrind gets shut off for this test.
554
555Set `type="shell"` to write the test case as a shell script. It implies that
556there is no memory debugging and valgrind gets shut off for this test.
557
558Set `option="no-output"` to prevent the test script to slap on the `--output`
559argument that directs the output to a file. The `--output` is also not added
560if the verify/stdout section is used.
561
562Set `option="force-output"` to make use of `--output` even when the test is
563otherwise written to verify stdout.
564
565Set `option="no-include"` to prevent the test script to slap on the
566`--include` argument.
567
568Set `option="no-q"` avoid using `-q` as the first argument in the curl command
569line.
570
571Set `option="binary-trace"` to use `--trace` instead of `--trace-ascii` for
572tracing. Suitable for binary-oriented protocols such as MQTT.
573
574Set `timeout="secs"` to override default server logs advisor read lock
575timeout. This timeout is used by the test harness, once that the command has
576completed execution, to wait for the test server to write out server side log
577files and remove the lock that advised not to read them. The "secs" parameter
578is the not negative integer number of seconds for the timeout. This `timeout`
579attribute is documented for completeness sake, but is deep test harness stuff
580and only needed for singular and specific test cases. Avoid using it.
581
582Set `delay="secs"` to introduce a time delay once that the command has
583completed execution and before the `<postcheck>` section runs. The "secs"
584parameter is the not negative integer number of seconds for the delay. This
585'delay' attribute is intended for specific test cases, and normally not
586needed.
587
588### `<file name="%LOGDIR/filename" [nonewline="yes"]>`
589This creates the named file with this content before the test case is run,
590which is useful if the test case needs a file to act on.
591
592If `nonewline="yes"` is used, the created file gets the final newline stripped
593off.
594
595### `<file1>`
5961 to 4 can be appended to 'file' to create more files.
597
598### `<file2>`
599
600### `<file3>`
601
602### `<file4>`
603
604### `<stdin [nonewline="yes"]>`
605Pass this given data on stdin to the tool.
606
607If `nonewline` is set, we cut off the trailing newline of this given data
608before comparing with the one actually received by the client
609
610## `<disable>`
611
612If `test-duphandle` is a listed item here, this is not run when
613`--test-duphandle` is used.
614
615## `<verify>`
616### `<errorcode>`
617numerical error code curl is supposed to return. Specify a list of accepted
618error codes by separating multiple numbers with comma. See test 237 for an
619example.
620
621### `<strip>`
622One regex per line that is removed from the protocol dumps before the
623comparison is made. This is useful to remove dependencies on dynamically
624changing protocol data such as port numbers or user-agent strings.
625
626### `<strippart>`
627One perl op per line that operates on the protocol dump. This is pretty
628advanced. Example: `s/^EPRT .*/EPRT stripped/`.
629
630### `<postcheck>`
631A command line that if set gets run by the test script after the test. If the
632command exists with a non-zero status code, the test is considered failed.
633
634### `<notexists>`
635A list of directory entries that are checked for after the test has completed
636and that must not exist. A listed entry existing causes the test to fail.
637
638### `<protocol [nonewline="yes"][crlf="yes"]>`
639
640the protocol dump curl should transmit, if `nonewline` is set, we cut off the
641trailing newline of this given data before comparing with the one actually
642sent by the client The `<strip>` and `<strippart>` rules are applied before
643comparisons are made.
644
645`crlf=yes` forces the newlines to become CRLF even if not written so in the
646test.
647
648### `<proxy [nonewline="yes"][crlf="yes"]>`
649
650The protocol dump curl should transmit to an HTTP proxy (when the http-proxy
651server is used), if `nonewline` is set, we cut off the trailing newline of
652this given data before comparing with the one actually sent by the client The
653`<strip>` and `<strippart>` rules are applied before comparisons are made.
654
655### `<stderr [mode="text"] [nonewline="yes"] [crlf="yes"]>`
656This verifies that this data was passed to stderr.
657
658Use the mode="text" attribute if the output is in text mode on platforms that
659have a text/binary difference.
660
661`crlf=yes` forces the newlines to become CRLF even if not written so in the
662test.
663
664If `nonewline` is set, we cut off the trailing newline of this given data
665before comparing with the one actually received by the client
666
667### `<stdout [mode="text"] [nonewline="yes"] [crlf="yes"] [loadfile="filename"]>`
668This verifies that this data was passed to stdout.
669
670Use the mode="text" attribute if the output is in text mode on platforms that
671have a text/binary difference.
672
673If `nonewline` is set, we cut off the trailing newline of this given data
674before comparing with the one actually received by the client
675
676`crlf=yes` forces the newlines to become CRLF even if not written so in the
677test.
678
679`loadfile="filename"` makes loading the data from an external file.
680
681### `<file name="%LOGDIR/filename" [mode="text"]>`
682The file's contents must be identical to this after the test is complete. Use
683the mode="text" attribute if the output is in text mode on platforms that have
684a text/binary difference.
685
686### `<file1>`
6871 to 4 can be appended to 'file' to compare more files.
688
689### `<file2>`
690
691### `<file3>`
692
693### `<file4>`
694
695### `<stripfile>`
696One perl op per line that operates on the output file or stdout before being
697compared with what is stored in the test file. This is pretty
698advanced. Example: "s/^EPRT .*/EPRT stripped/"
699
700### `<stripfile1>`
7011 to 4 can be appended to `stripfile` to strip the corresponding `<fileN>`
702content
703
704### `<stripfile2>`
705
706### `<stripfile3>`
707
708### `<stripfile4>`
709
710### `<upload [crlf="yes"] [nonewline="yes"]>`
711the contents of the upload data curl should have sent
712
713`crlf=yes` forces *upload* newlines to become CRLF even if not written so in
714the source file.
715
716`nonewline=yes` means that the last byte (the trailing newline character)
717should be cut off from the upload data before comparing it.
718
719### `<valgrind>`
720disable - disables the valgrind log check for this test
721