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