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 running a unit test and the keywords include `unittest`, the `<tool>` 212section can be left empty to use the standard unit test tool name `unitN` where 213`N` is the test number. 214 215The `text-ci` make target automatically skips test with the `flaky` keyword. 216 217Tests that have strict timing dependencies have the `timing-dependent` keyword. 218These are intended to eventually be treated specially on CI builds which are 219often run on overloaded machines with unpredictable timing. 220 221## `<reply>` 222 223### `<data [nocheck="yes"] [sendzero="yes"] [base64="yes"] [hex="yes"] [nonewline="yes"] [crlf="yes"]>` 224 225data to be sent to the client on its request and later verified that it 226arrived safely. Set `nocheck="yes"` to prevent the test script from verifying 227the arrival of this data. 228 229If the data contains `swsclose` anywhere within the start and end tag, and 230this is an HTTP test, then the connection is closed by the server after this 231response is sent. If not, the connection is kept persistent. 232 233If the data contains `swsbounce` anywhere within the start and end tag, the 234HTTP server detects if this is a second request using the same test and part 235number and then increases the part number with one. This is useful for auth 236tests and similar. 237 238`sendzero=yes` means that the (FTP) server "sends" the data even if the size 239is zero bytes. Used to verify curl's behavior on zero bytes transfers. 240 241`base64=yes` means that the data provided in the test-file is a chunk of data 242encoded with base64. It is the only way a test case can contain binary 243data. (This attribute can in fact be used on any section, but it does not make 244much sense for other sections than "data"). 245 246`hex=yes` means that the data is a sequence of hex pairs. It gets decoded and 247used as "raw" data. 248 249`nonewline=yes` means that the last byte (the trailing newline character) 250should be cut off from the data before sending or comparing it. 251 252`crlf=yes` forces *header* newlines to become CRLF even if not written so in 253the source file. Note that this makes runtests.pl parse and "guess" what is a 254header and what is not in order to apply the CRLF line endings appropriately. 255 256For FTP file listings, the `<data>` section is be used *only* if you make sure 257that there has been a CWD done first to a directory named `test-[NUM]` where 258`NUM` is the test case number. Otherwise the ftp server cannot know from which 259test file to load the list content. 260 261### `<dataNUM [crlf="yes"]>` 262 263Send back this contents instead of the `<data>` one. The `NUM` is set by: 264 265 - The test number in the request line is >10000 and this is the remainder 266 of [test case number]%10000. 267 - The request was HTTP and included digest details, which adds 1000 to `NUM` 268 - If an HTTP request is NTLM type-1, it adds 1001 to `NUM` 269 - If an HTTP request is NTLM type-3, it adds 1002 to `NUM` 270 - If an HTTP request is Basic and `NUM` is already >=1000, it adds 1 to `NUM` 271 - If an HTTP request is Negotiate, `NUM` gets incremented by one for each 272 request with Negotiate authorization header on the same test case. 273 274Dynamically changing `NUM` in this way allows the test harness to be used to 275test authentication negotiation where several different requests must be sent 276to complete a transfer. The response to each request is found in its own data 277section. Validating the entire negotiation sequence can be done by specifying 278a `datacheck` section. 279 280### `<connect>` 281The connect section is used instead of the 'data' for all CONNECT 282requests. The remainder of the rules for the data section then apply but with 283a connect prefix. 284 285### `<socks>` 286Address type and address details as logged by the SOCKS proxy. 287 288### `<datacheck [mode="text"] [nonewline="yes"] [crlf="yes"]>` 289if the data is sent but this is what should be checked afterwards. If 290`nonewline=yes` is set, runtests cuts off the trailing newline from the data 291before comparing with the one actually received by the client. 292 293Use the `mode="text"` attribute if the output is in text mode on platforms 294that have a text/binary difference. 295 296### `<datacheckNUM [nonewline="yes"] [mode="text"] [crlf="yes"]>` 297The contents of numbered `datacheck` sections are appended to the non-numbered 298one. 299 300### `<size>` 301number to return on an ftp SIZE command (set to -1 to make this command fail) 302 303### `<mdtm>` 304what to send back if the client sends a (FTP) `MDTM` command, set to -1 to 305have it return that the file does not exist 306 307### `<postcmd>` 308special purpose server-command to control its behavior *after* the 309reply is sent 310For HTTP/HTTPS, these are supported: 311 312`wait [secs]` - Pause for the given time 313 314### `<servercmd>` 315Special-commands for the server. 316 317The first line of this file is always set to `Testnum [number]` by the test 318script, to allow servers to read that to know what test the client is about to 319issue. 320 321#### For FTP/SMTP/POP/IMAP 322 323- `REPLY [command] [return value] [response string]` - Changes how the server 324 responds to the [command]. [response string] is evaluated as a perl string, 325 so it can contain embedded \r\n, for example. There is a special [command] 326 named "welcome" (without quotes) which is the string sent immediately on 327 connect as a welcome. 328- `REPLYLF` (like above but sends the response terminated with LF-only and not 329 CRLF) 330- `COUNT [command] [num]` - Do the `REPLY` change for `[command]` only `[num]` 331 times and then go back to the built-in approach 332- `DELAY [command] [secs]` - Delay responding to this command for the given 333 time 334- `RETRWEIRDO` - Enable the "weirdo" RETR case when multiple response lines 335 appear at once when a file is transferred 336- `RETRNOSIZE` - Make sure the RETR response does not contain the size of the 337 file 338- `RETRSIZE [size]` - Force RETR response to contain the specified size 339- `NOSAVE` - Do not actually save what is received 340- `SLOWDOWN` - Send FTP responses with 0.01 sec delay between each byte 341- `SLOWDOWNDATA` - Send FTP responses with 0.01 sec delay between each data 342 byte 343- `PASVBADIP` - makes PASV send back an illegal IP in its 227 response 344- `CAPA [capabilities]` - Enables support for and specifies a list of space 345 separated capabilities to return to the client for the IMAP `CAPABILITY`, 346 POP3 `CAPA` and SMTP `EHLO` commands 347- `AUTH [mechanisms]` - Enables support for SASL authentication and specifies 348 a list of space separated mechanisms for IMAP, POP3 and SMTP 349- `STOR [msg]` respond with this instead of default after `STOR` 350 351#### For HTTP/HTTPS 352 353- `auth_required` if this is set and a POST/PUT is made without auth, the 354 server does NOT wait for the full request body to get sent 355- `delay: [msecs]` - delay this amount after connection 356- `idle` - do nothing after receiving the request, just "sit idle" 357- `stream` - continuously send data to the client, never-ending 358- `writedelay: [msecs]` delay this amount between reply packets 359- `skip: [num]` - instructs the server to ignore reading this many bytes from 360 a PUT or POST request 361- `rtp: part [num] channel [num] size [num]` - stream a fake RTP packet for 362 the given part on a chosen channel with the given payload size 363- `connection-monitor` - When used, this logs `[DISCONNECT]` to the 364 `server.input` log when the connection is disconnected. 365- `upgrade` - when an HTTP upgrade header is found, the server upgrades to 366 http2 367- `swsclose` - instruct server to close connection after response 368- `no-expect` - do not read the request body if Expect: is present 369 370#### For TFTP 371`writedelay: [secs]` delay this amount between reply packets (each packet 372 being 512 bytes payload) 373 374## `<client>` 375 376### `<server>` 377What server(s) this test case requires/uses. Available servers: 378 379- `dict` 380- `file` 381- `ftp` 382- `ftp-ipv6` 383- `ftps` 384- `gopher` 385- `gopher-ipv6` 386- `gophers` 387- `http` 388- `http/2` 389- `http-ipv6` 390- `http-proxy` 391- `https` 392- `https-proxy` 393- `httptls+srp` 394- `httptls+srp-ipv6` 395- `http-unix` 396- `imap` 397- `mqtt` 398- `none` 399- `pop3` 400- `rtsp` 401- `rtsp-ipv6` 402- `scp` 403- `sftp` 404- `smb` 405- `smtp` 406- `socks4` 407- `socks5` 408- `socks5unix` 409- `telnet` 410- `tftp` 411 412Give only one per line. This subsection is mandatory (use `none` if no servers 413are required). Servers that require a special server certificate can have the 414PEM certificate filename (found in the `certs` directory) appended to the 415server name separated by a space. 416 417### `<features>` 418A list of features that MUST be present in the client/library for this test to 419be able to run. If a required feature is not present then the test is SKIPPED. 420 421Alternatively a feature can be prefixed with an exclamation mark to indicate a 422feature is NOT required. If the feature is present then the test is SKIPPED. 423 424Features testable here are: 425 426- `alt-svc` 427- `AppleIDN` 428- `bearssl` 429- `brotli` 430- `c-ares` 431- `CharConv` 432- `codeset-utf8`. If the running codeset is UTF-8 capable. 433- `cookies` 434- `crypto` 435- `Debug` 436- `DoH` 437- `getrlimit` 438- `GnuTLS` 439- `GSS-API` 440- `h2c` 441- `headers-api` 442- `HSTS` 443- `HTTP-auth` 444- `http/2` 445- `http/3` 446- `HTTPS-proxy` 447- `IDN` 448- `IPv6` 449- `Kerberos` 450- `Largefile` 451- `large-time` (time_t is larger than 32-bit) 452- `large-size` (size_t is larger than 32-bit) 453- `ld_preload` 454- `libssh2` 455- `libssh` 456- `oldlibssh` (versions before 0.9.4) 457- `libz` 458- `local-http`. The HTTP server runs on 127.0.0.1 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### `<tool>` 514Name of tool to invoke instead of "curl". This tool must be built and exist 515either in the `libtest/` directory (if the tool name starts with `lib`) or in 516the `unit/` directory (if the tool name starts with `unit`). 517 518### `<name>` 519Brief test case description, shown when the test runs. 520 521### `<setenv>` 522 523 variable1=contents1 524 variable2=contents2 525 variable3 526 527Set the given environment variables to the specified value before the actual 528command is run. They are restored back to their former values again after the 529command has been run. 530 531If the variable name has no assignment, no `=`, then that variable is just 532deleted. 533 534### `<command [option="no-q/no-output/no-include/force-output/binary-trace"] [timeout="secs"][delay="secs"][type="perl/shell"]>` 535Command line to run. 536 537Note that the URL that gets passed to the server actually controls what data 538that is returned. The last slash in the URL must be followed by a number. That 539number (N) is used by the test-server to load test case N and return the data 540that is defined within the `<reply><data></data></reply>` section. 541 542If there is no test number found above, the HTTP test server uses the number 543following the last dot in the given hostname (made so that a CONNECT can still 544pass on test number) so that "foo.bar.123" gets treated as test case 545123. Alternatively, if an IPv6 address is provided to CONNECT, the last 546hexadecimal group in the address is used as the test number. For example the 547address "[1234::ff]" would be treated as test case 255. 548 549Set `type="perl"` to write the test case as a perl script. It implies that 550there is no memory debugging and valgrind gets shut off for this test. 551 552Set `type="shell"` to write the test case as a shell script. It implies that 553there is no memory debugging and valgrind gets shut off for this test. 554 555Set `option="no-output"` to prevent the test script to slap on the `--output` 556argument that directs the output to a file. The `--output` is also not added 557if the verify/stdout section is used. 558 559Set `option="force-output"` to make use of `--output` even when the test is 560otherwise written to verify stdout. 561 562Set `option="no-include"` to prevent the test script to slap on the 563`--include` argument. 564 565Set `option="no-q"` avoid using `-q` as the first argument in the curl command 566line. 567 568Set `option="binary-trace"` to use `--trace` instead of `--trace-ascii` for 569tracing. Suitable for binary-oriented protocols such as MQTT. 570 571Set `timeout="secs"` to override default server logs advisor read lock 572timeout. This timeout is used by the test harness, once that the command has 573completed execution, to wait for the test server to write out server side log 574files and remove the lock that advised not to read them. The "secs" parameter 575is the not negative integer number of seconds for the timeout. This `timeout` 576attribute is documented for completeness sake, but is deep test harness stuff 577and only needed for singular and specific test cases. Avoid using it. 578 579Set `delay="secs"` to introduce a time delay once that the command has 580completed execution and before the `<postcheck>` section runs. The "secs" 581parameter is the not negative integer number of seconds for the delay. This 582'delay' attribute is intended for specific test cases, and normally not 583needed. 584 585### `<file name="%LOGDIR/filename" [nonewline="yes"]>` 586This creates the named file with this content before the test case is run, 587which is useful if the test case needs a file to act on. 588 589If `nonewline="yes"` is used, the created file gets the final newline stripped 590off. 591 592### `<file1>` 5931 to 4 can be appended to 'file' to create more files. 594 595### `<file2>` 596 597### `<file3>` 598 599### `<file4>` 600 601### `<stdin [nonewline="yes"]>` 602Pass this given data on stdin to the tool. 603 604If `nonewline` is set, we cut off the trailing newline of this given data 605before comparing with the one actually received by the client 606 607## `<disable>` 608 609If `test-duphandle` is a listed item here, this is not run when 610`--test-duphandle` is used. 611 612## `<verify>` 613### `<errorcode>` 614numerical error code curl is supposed to return. Specify a list of accepted 615error codes by separating multiple numbers with comma. See test 237 for an 616example. 617 618### `<strip>` 619One regex per line that is removed from the protocol dumps before the 620comparison is made. This is useful to remove dependencies on dynamically 621changing protocol data such as port numbers or user-agent strings. 622 623### `<strippart>` 624One perl op per line that operates on the protocol dump. This is pretty 625advanced. Example: `s/^EPRT .*/EPRT stripped/`. 626 627### `<postcheck>` 628A command line that if set gets run by the test script after the test. If the 629command exists with a non-zero status code, the test is considered failed. 630 631### `<notexists>` 632A list of directory entries that are checked for after the test has completed 633and that must not exist. A listed entry existing causes the test to fail. 634 635### `<protocol [nonewline="yes"][crlf="yes"]>` 636 637the protocol dump curl should transmit, if `nonewline` is set, we cut off the 638trailing newline of this given data before comparing with the one actually 639sent by the client The `<strip>` and `<strippart>` rules are applied before 640comparisons are made. 641 642`crlf=yes` forces the newlines to become CRLF even if not written so in the 643test. 644 645### `<proxy [nonewline="yes"][crlf="yes"]>` 646 647The protocol dump curl should transmit to an HTTP proxy (when the http-proxy 648server is used), if `nonewline` is set, we cut off the trailing newline of 649this given data before comparing with the one actually sent by the client The 650`<strip>` and `<strippart>` rules are applied before comparisons are made. 651 652### `<stderr [mode="text"] [nonewline="yes"] [crlf="yes"]>` 653This verifies that this data was passed to stderr. 654 655Use the mode="text" attribute if the output is in text mode on platforms that 656have a text/binary difference. 657 658`crlf=yes` forces the newlines to become CRLF even if not written so in the 659test. 660 661If `nonewline` is set, we cut off the trailing newline of this given data 662before comparing with the one actually received by the client 663 664### `<stdout [mode="text"] [nonewline="yes"] [crlf="yes"] [loadfile="filename"]>` 665This verifies that this data was passed to stdout. 666 667Use the mode="text" attribute if the output is in text mode on platforms that 668have a text/binary difference. 669 670If `nonewline` is set, we cut off the trailing newline of this given data 671before comparing with the one actually received by the client 672 673`crlf=yes` forces the newlines to become CRLF even if not written so in the 674test. 675 676`loadfile="filename"` makes loading the data from an external file. 677 678### `<file name="%LOGDIR/filename" [mode="text"]>` 679The file's contents must be identical to this after the test is complete. Use 680the mode="text" attribute if the output is in text mode on platforms that have 681a text/binary difference. 682 683### `<file1>` 6841 to 4 can be appended to 'file' to compare more files. 685 686### `<file2>` 687 688### `<file3>` 689 690### `<file4>` 691 692### `<stripfile>` 693One perl op per line that operates on the output file or stdout before being 694compared with what is stored in the test file. This is pretty 695advanced. Example: "s/^EPRT .*/EPRT stripped/" 696 697### `<stripfile1>` 6981 to 4 can be appended to `stripfile` to strip the corresponding `<fileN>` 699content 700 701### `<stripfile2>` 702 703### `<stripfile3>` 704 705### `<stripfile4>` 706 707### `<upload [crlf="yes"] [nonewline="yes"]>` 708the contents of the upload data curl should have sent 709 710`crlf=yes` forces *upload* newlines to become CRLF even if not written so in 711the source file. 712 713`nonewline=yes` means that the last byte (the trailing newline character) 714should be cut off from the upload data before comparing it. 715 716### `<valgrind>` 717disable - disables the valgrind log check for this test 718