xref: /curl/tests/FILEFORMAT.md (revision 7eda757d)
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
125- `%CLIENTIP` - IPv4 address of the client running curl
126- `%CURL` - Path to the curl executable
127- `%DATE` - current YYYY-MM-DD date
128- `%FILE_PWD` - Current directory, on Windows prefixed with a slash
129- `%FTP6PORT` - IPv6 port number of the FTP server
130- `%FTPPORT` - Port number of the FTP server
131- `%FTPSPORT` - Port number of the FTPS server
132- `%FTPTIME2` - Timeout in seconds that should be just sufficient to receive a
133  response from the test FTP server
134- `%FTPTIME3` - Even longer than `%FTPTIME2`
135- `%GOPHER6PORT` - IPv6 port number of the Gopher server
136- `%GOPHERPORT` - Port number of the Gopher server
137- `%GOPHERSPORT` - Port number of the Gophers server
138- `%HOST6IP` - IPv6 address of the host running this test
139- `%HOSTIP` - IPv4 address of the host running this test
140- `%HTTP2PORT` - Port number of the HTTP/2 server
141- `%HTTP6PORT` - IPv6 port number of the HTTP server
142- `%HTTPPORT` - Port number of the HTTP server
143- `%HTTPSPORT` - Port number of the HTTPS server
144- `%HTTPSPROXYPORT` - Port number of the HTTPS-proxy
145- `%HTTPTLS6PORT` - IPv6 port number of the HTTP TLS server
146- `%HTTPTLSPORT` - Port number of the HTTP TLS server
147- `%HTTPUNIXPATH` - Path to the Unix socket of the HTTP server
148- `%IMAP6PORT` - IPv6 port number of the IMAP server
149- `%IMAPPORT` - Port number of the IMAP server
150- `%LOGDIR` - Log directory relative to %PWD
151- `%MQTTPORT` - Port number of the MQTT server
152- `%NOLISTENPORT` - Port number where no service is listening
153- `%POP36PORT` - IPv6 port number of the POP3 server
154- `%POP3PORT` - Port number of the POP3 server
155- `%POSIX_PWD` - Current directory somewhat MinGW friendly
156- `%PROXYPORT` - Port number of the HTTP proxy
157- `%PWD` - Current directory
158- `%RTSP6PORT` - IPv6 port number of the RTSP server
159- `%RTSPPORT` - Port number of the RTSP server
160- `%SMBPORT` - Port number of the SMB server
161- `%SMBSPORT` - Port number of the SMBS server
162- `%SMTP6PORT` - IPv6 port number of the SMTP server
163- `%SMTPPORT` - Port number of the SMTP server
164- `%SOCKSPORT` - Port number of the SOCKS4/5 server
165- `%SOCKSUNIXPATH` - Path to the Unix socket of the SOCKS server
166- `%SRCDIR` - Full path to the source dir
167- `%SSH_PWD` - Current directory friendly for the SSH server
168- `%SSHPORT` - Port number of the SCP/SFTP server
169- `%SSHSRVMD5` - MD5 of SSH server's public key
170- `%SSHSRVSHA256` - SHA256 of SSH server's public key
171- `%TELNETPORT` - Port number of the telnet server
172- `%TESTNUMBER` - Number of the test case
173- `%TFTP6PORT` - IPv6 port number of the TFTP server
174- `%TFTPPORT` - Port number of the TFTP server
175- `%USER` - Login ID of the user running the test
176- `%VERNUM` - the version number of the tested curl (without -DEV)
177- `%VERSION` - the full version number of the tested curl
178
179# `<testcase>`
180
181Each test is always specified entirely within the `testcase` tag. Each test
182case is split up in four main sections: `info`, `reply`, `client` and
183`verify`.
184
185- **info** provides information about the test case
186
187- **reply** is used for the server to know what to send as a reply for the
188requests curl sends
189
190- **client** defines how the client should behave
191
192- **verify** defines how to verify that the data stored after a command has
193been run ended up correct
194
195Each main section has a number of available subsections that can be specified,
196that are checked/used if specified.
197
198## `<info>`
199
200### `<keywords>`
201A newline-separated list of keywords describing what this test case uses and
202tests. Try to use already used keywords. These keywords are used for
203statistical/informational purposes and for choosing or skipping classes of
204tests. Keywords must begin with an alphabetic character, `-`, `[` or `{` and
205may actually consist of multiple words separated by spaces which are treated
206together as a single identifier. Most keywords are only there to provide a way
207for users to skip certain classes of tests, if desired, but a few are treated
208specially by the test harness or build system.
209
210When using curl built with Hyper, the keywords must include `HTTP` or `HTTPS`
211for 'hyper mode' to kick in and make line ending checks work for tests.
212
213When running a unit test and the keywords include `unittest`, the `<tool>`
214section can be left empty to use the standard unit test tool name `unitN` where
215`N` is the test number.
216
217The `text-ci` make target automatically skips test with the `flaky` keyword.
218
219Tests that have strict timing dependencies have the `timing-dependent` keyword.
220These are intended to eventually be treated specially on CI builds which are
221often run on overloaded machines with unpredictable timing.
222
223## `<reply>`
224
225### `<data [nocheck="yes"] [sendzero="yes"] [base64="yes"] [hex="yes"] [nonewline="yes"] [crlf="yes"]>`
226
227data to be sent to the client on its request and later verified that it
228arrived safely. Set `nocheck="yes"` to prevent the test script from verifying
229the arrival of this data.
230
231If the data contains `swsclose` anywhere within the start and end tag, and
232this is an HTTP test, then the connection is closed by the server after this
233response is sent. If not, the connection is kept persistent.
234
235If the data contains `swsbounce` anywhere within the start and end tag, the
236HTTP server detects if this is a second request using the same test and part
237number and then increases the part number with one. This is useful for auth
238tests and similar.
239
240`sendzero=yes` means that the (FTP) server "sends" the data even if the size
241is zero bytes. Used to verify curl's behavior on zero bytes transfers.
242
243`base64=yes` means that the data provided in the test-file is a chunk of data
244encoded with base64. It is the only way a test case can contain binary
245data. (This attribute can in fact be used on any section, but it does not make
246much sense for other sections than "data").
247
248`hex=yes` means that the data is a sequence of hex pairs. It gets decoded and
249used as "raw" data.
250
251`nonewline=yes` means that the last byte (the trailing newline character)
252should be cut off from the data before sending or comparing it.
253
254`crlf=yes` forces *header* newlines to become CRLF even if not written so in
255the source file. Note that this makes runtests.pl parse and "guess" what is a
256header and what is not in order to apply the CRLF line endings appropriately.
257
258For FTP file listings, the `<data>` section is be used *only* if you make sure
259that there has been a CWD done first to a directory named `test-[NUM]` where
260`NUM` is the test case number. Otherwise the ftp server cannot know from which
261test file to load the list content.
262
263### `<dataNUM [crlf="yes"]>`
264
265Send back this contents instead of the `<data>` one. The `NUM` is set by:
266
267 - The test number in the request line is >10000 and this is the remainder
268   of [test case number]%10000.
269 - The request was HTTP and included digest details, which adds 1000 to `NUM`
270 - If an HTTP request is NTLM type-1, it adds 1001 to `NUM`
271 - If an HTTP request is NTLM type-3, it adds 1002 to `NUM`
272 - If an HTTP request is Basic and `NUM` is already >=1000, it adds 1 to `NUM`
273 - If an HTTP request is Negotiate, `NUM` gets incremented by one for each
274   request with Negotiate authorization header on the same test case.
275
276Dynamically changing `NUM` in this way allows the test harness to be used to
277test authentication negotiation where several different requests must be sent
278to complete a transfer. The response to each request is found in its own data
279section. Validating the entire negotiation sequence can be done by specifying
280a `datacheck` section.
281
282### `<connect>`
283The connect section is used instead of the 'data' for all CONNECT
284requests. The remainder of the rules for the data section then apply but with
285a connect prefix.
286
287### `<socks>`
288Address type and address details as logged by the SOCKS proxy.
289
290### `<datacheck [mode="text"] [nonewline="yes"] [crlf="yes"]>`
291if the data is sent but this is what should be checked afterwards. If
292`nonewline=yes` is set, runtests cuts off the trailing newline from the data
293before comparing with the one actually received by the client.
294
295Use the `mode="text"` attribute if the output is in text mode on platforms
296that have a text/binary difference.
297
298### `<datacheckNUM [nonewline="yes"] [mode="text"] [crlf="yes"]>`
299The contents of numbered `datacheck` sections are appended to the non-numbered
300one.
301
302### `<size>`
303number to return on an ftp SIZE command (set to -1 to make this command fail)
304
305### `<mdtm>`
306what to send back if the client sends a (FTP) `MDTM` command, set to -1 to
307have it return that the file does not exist
308
309### `<postcmd>`
310special purpose server-command to control its behavior *after* the
311reply is sent
312For HTTP/HTTPS, these are supported:
313
314`wait [secs]` - Pause for the given time
315
316### `<servercmd>`
317Special-commands for the server.
318
319The first line of this file is always set to `Testnum [number]` by the test
320script, to allow servers to read that to know what test the client is about to
321issue.
322
323#### For FTP/SMTP/POP/IMAP
324
325- `REPLY [command] [return value] [response string]` - Changes how the server
326  responds to the [command]. [response string] is evaluated as a perl string,
327  so it can contain embedded \r\n, for example. There is a special [command]
328  named "welcome" (without quotes) which is the string sent immediately on
329  connect as a welcome.
330- `REPLYLF` (like above but sends the response terminated with LF-only and not
331   CRLF)
332- `COUNT [command] [num]` - Do the `REPLY` change for `[command]` only `[num]`
333  times and then go back to the built-in approach
334- `DELAY [command] [secs]` - Delay responding to this command for the given
335  time
336- `RETRWEIRDO` - Enable the "weirdo" RETR case when multiple response lines
337   appear at once when a file is transferred
338- `RETRNOSIZE` - Make sure the RETR response does not contain the size of the
339  file
340- `RETRSIZE [size]` - Force RETR response to contain the specified size
341- `NOSAVE` - Do not actually save what is received
342- `SLOWDOWN` - Send FTP responses with 0.01 sec delay between each byte
343- `SLOWDOWNDATA` - Send FTP responses with 0.01 sec delay between each data
344  byte
345- `PASVBADIP` - makes PASV send back an illegal IP in its 227 response
346- `CAPA [capabilities]` - Enables support for and specifies a list of space
347   separated capabilities to return to the client for the IMAP `CAPABILITY`,
348   POP3 `CAPA` and SMTP `EHLO` commands
349- `AUTH [mechanisms]` - Enables support for SASL authentication and specifies
350   a list of space separated mechanisms for IMAP, POP3 and SMTP
351- `STOR [msg]` respond with this instead of default after `STOR`
352
353#### For HTTP/HTTPS
354
355- `auth_required` if this is set and a POST/PUT is made without auth, the
356  server does NOT wait for the full request body to get sent
357- `delay: [msecs]` - delay this amount after connection
358- `idle` - do nothing after receiving the request, just "sit idle"
359- `stream` - continuously send data to the client, never-ending
360- `writedelay: [msecs]` delay this amount between reply packets
361- `skip: [num]` - instructs the server to ignore reading this many bytes from
362  a PUT or POST request
363- `rtp: part [num] channel [num] size [num]` - stream a fake RTP packet for
364  the given part on a chosen channel with the given payload size
365- `connection-monitor` - When used, this logs `[DISCONNECT]` to the
366  `server.input` log when the connection is disconnected.
367- `upgrade` - when an HTTP upgrade header is found, the server upgrades to
368  http2
369- `swsclose` - instruct server to close connection after response
370- `no-expect` - do not read the request body if Expect: is present
371
372#### For TFTP
373`writedelay: [secs]` delay this amount between reply packets (each packet
374  being 512 bytes payload)
375
376## `<client>`
377
378### `<server>`
379What server(s) this test case requires/uses. Available servers:
380
381- `dict`
382- `file`
383- `ftp`
384- `ftp-ipv6`
385- `ftps`
386- `gopher`
387- `gopher-ipv6`
388- `gophers`
389- `http`
390- `http/2`
391- `http-ipv6`
392- `http-proxy`
393- `https`
394- `https-proxy`
395- `httptls+srp`
396- `httptls+srp-ipv6`
397- `http-unix`
398- `imap`
399- `mqtt`
400- `none`
401- `pop3`
402- `rtsp`
403- `rtsp-ipv6`
404- `scp`
405- `sftp`
406- `smb`
407- `smtp`
408- `socks4`
409- `socks5`
410- `socks5unix`
411- `telnet`
412- `tftp`
413
414Give only one per line. This subsection is mandatory (use `none` if no servers
415are required). Servers that require a special server certificate can have the
416PEM certificate filename (found in the `certs` directory) appended to the
417server name separated by a space.
418
419### `<features>`
420A list of features that MUST be present in the client/library for this test to
421be able to run. If a required feature is not present then the test is SKIPPED.
422
423Alternatively a feature can be prefixed with an exclamation mark to indicate a
424feature is NOT required. If the feature is present then the test is SKIPPED.
425
426Features testable here are:
427
428- `alt-svc`
429- `AppleIDN`
430- `bearssl`
431- `brotli`
432- `c-ares`
433- `CharConv`
434- `cookies`
435- `crypto`
436- `Debug`
437- `DoH`
438- `getrlimit`
439- `GnuTLS`
440- `GSS-API`
441- `h2c`
442- `headers-api`
443- `HSTS`
444- `HTTP-auth`
445- `http/2`
446- `http/3`
447- `HTTPS-proxy`
448- `hyper`
449- `IDN`
450- `IPv6`
451- `Kerberos`
452- `Largefile`
453- `large-time` (time_t is larger than 32-bit)
454- `ld_preload`
455- `libssh2`
456- `libssh`
457- `oldlibssh` (versions before 0.9.4)
458- `libz`
459- `manual`
460- `mbedtls`
461- `Mime`
462- `netrc`
463- `nghttpx`
464- `nghttpx-h3`
465- `NTLM`
466- `NTLM_WB`
467- `OpenSSL`
468- `parsedate`
469- `proxy`
470- `PSL`
471- `rustls`
472- `Schannel`
473- `sectransp`
474- `shuffle-dns`
475- `socks`
476- `SPNEGO`
477- `SSL`
478- `SSLpinning`
479- `SSPI`
480- `threaded-resolver`
481- `TLS-SRP`
482- `TrackMemory`
483- `typecheck`
484- `threadsafe`
485- `Unicode`
486- `unittest`
487- `UnixSockets`
488- `verbose-strings`
489- `wakeup`
490- `win32`
491- `WinIDN`
492- `wolfssh`
493- `wolfssl`
494- `xattr`
495- `zstd`
496
497as well as each protocol that curl supports. A protocol only needs to be
498specified if it is different from the server (useful when the server is
499`none`).
500
501### `<killserver>`
502Using the same syntax as in `<server>` but when mentioned here these servers
503are explicitly KILLED when this test case is completed. Only use this if there
504is no other alternatives. Using this of course requires subsequent tests to
505restart servers.
506
507### `<precheck>`
508A command line that if set gets run by the test script before the test. If an
509output is displayed by the command or if the return code is non-zero, the test
510is skipped and the (single-line) output is displayed as reason for not running
511the test.
512
513### `<postcheck>`
514A command line that if set gets run by the test script after the test. If the
515command exists with a non-zero status code, the test is considered failed.
516
517### `<tool>`
518Name of tool to invoke instead of "curl". This tool must be built and exist
519either in the `libtest/` directory (if the tool name starts with `lib`) or in
520the `unit/` directory (if the tool name starts with `unit`).
521
522### `<name>`
523Brief test case description, shown when the test runs.
524
525### `<setenv>`
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### `<filename="%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## `<verify>`
611### `<errorcode>`
612numerical error code curl is supposed to return. Specify a list of accepted
613error codes by separating multiple numbers with comma. See test 237 for an
614example.
615
616### `<strip>`
617One regex per line that is removed from the protocol dumps before the
618comparison is made. This is useful to remove dependencies on dynamically
619changing protocol data such as port numbers or user-agent strings.
620
621### `<strippart>`
622One perl op per line that operates on the protocol dump. This is pretty
623advanced. Example: `s/^EPRT .*/EPRT stripped/`.
624
625### `<protocol [nonewline="yes"][crlf="yes"]>`
626
627the protocol dump curl should transmit, if `nonewline` is set, we cut off the
628trailing newline of this given data before comparing with the one actually
629sent by the client The `<strip>` and `<strippart>` rules are applied before
630comparisons are made.
631
632`crlf=yes` forces the newlines to become CRLF even if not written so in the
633test.
634
635### `<proxy [nonewline="yes"][crlf="yes"]>`
636
637The protocol dump curl should transmit to an HTTP proxy (when the http-proxy
638server is used), if `nonewline` is set, we cut off the trailing newline of
639this given data before comparing with the one actually sent by the client The
640`<strip>` and `<strippart>` rules are applied before comparisons are made.
641
642### `<stderr [mode="text"] [nonewline="yes"] [crlf="yes"]>`
643This verifies that this data was passed to stderr.
644
645Use the mode="text" attribute if the output is in text mode on platforms that
646have a text/binary difference.
647
648`crlf=yes` forces the newlines to become CRLF even if not written so in the
649test.
650
651If `nonewline` is set, we cut off the trailing newline of this given data
652before comparing with the one actually received by the client
653
654### `<stdout [mode="text"] [nonewline="yes"] [crlf="yes"] [loadfile="filename"]>`
655This verifies that this data was passed to stdout.
656
657Use the mode="text" attribute if the output is in text mode on platforms that
658have a text/binary difference.
659
660If `nonewline` is set, we cut off the trailing newline of this given data
661before comparing with the one actually received by the client
662
663`crlf=yes` forces the newlines to become CRLF even if not written so in the
664test.
665
666`loadfile="filename"` makes loading the data from an external file.
667
668### `<filename="%LOGDIR/filename" [mode="text"]>`
669The file's contents must be identical to this after the test is complete. Use
670the mode="text" attribute if the output is in text mode on platforms that have
671a text/binary difference.
672
673### `<file1>`
6741 to 4 can be appended to 'file' to compare more files.
675
676### `<file2>`
677
678### `<file3>`
679
680### `<file4>`
681
682### `<stripfile>`
683One perl op per line that operates on the output file or stdout before being
684compared with what is stored in the test file. This is pretty
685advanced. Example: "s/^EPRT .*/EPRT stripped/"
686
687### `<stripfile1>`
6881 to 4 can be appended to `stripfile` to strip the corresponding `<fileN>`
689content
690
691### `<stripfile2>`
692
693### `<stripfile3>`
694
695### `<stripfile4>`
696
697### `<upload [crlf="yes"] [nonewline="yes"]>`
698the contents of the upload data curl should have sent
699
700`crlf=yes` forces *upload* newlines to become CRLF even if not written so in
701the source file.
702
703`nonewline=yes` means that the last byte (the trailing newline character)
704should be cut off from the upload data before comparing it.
705
706### `<valgrind>`
707disable - disables the valgrind log check for this test
708