is skipped and the (single-line) output is displayed as reason for not running
the test.
-### `<postcheck>`
-A command line that if set gets run by the test script after the test. If the
-command exists with a non-zero status code, the test is considered failed.
-
### `<tool>`
Name of tool to invoke instead of "curl". This tool must be built and exist
either in the `libtest/` directory (if the tool name starts with `lib`) or in
One perl op per line that operates on the protocol dump. This is pretty
advanced. Example: `s/^EPRT .*/EPRT stripped/`.
+### `<postcheck>`
+A command line that if set gets run by the test script after the test. If the
+command exists with a non-zero status code, the test is considered failed.
+
+### `<notexists>`
+A list of directory entries that are checked for after the test has completed
+and that must not exist. A listed entry existing causes the test to fail.
+
### `<protocol [nonewline="yes"][crlf="yes"]>`
the protocol dump curl should transmit, if `nonewline` is set, we cut off the
<command>
--version
</command>
-<postcheck>
-%SRCDIR/libtest/test%TESTNUMBER.pl ../curl-config %LOGDIR/stdout%TESTNUMBER protocols
-</postcheck>
</client>
#
# Verify data after the test has been "shot"
<verify>
+<postcheck>
+%SRCDIR/libtest/test%TESTNUMBER.pl ../curl-config %LOGDIR/stdout%TESTNUMBER protocols
+</postcheck>
<errorcode>
0
</errorcode>
<command>
--version
</command>
-<postcheck>
-%SRCDIR/libtest/test1013.pl ../curl-config %LOGDIR/stdout%TESTNUMBER features
-</postcheck>
</client>
#
# Verify data after the test has been "shot"
<verify>
+<postcheck>
+%SRCDIR/libtest/test1013.pl ../curl-config %LOGDIR/stdout%TESTNUMBER features
+</postcheck>
<errorcode>
0
</errorcode>
<command>
--version
</command>
-<postcheck>
-%SRCDIR/libtest/test%TESTNUMBER.pl ../curl-config %LOGDIR/stdout%TESTNUMBER version
-</postcheck>
</client>
#
# Verify data after the test has been "shot"
<verify>
+<postcheck>
+%SRCDIR/libtest/test%TESTNUMBER.pl ../curl-config %LOGDIR/stdout%TESTNUMBER version
+</postcheck>
<errorcode>
0
</errorcode>
<command>
--version
</command>
-<postcheck>
-%SRCDIR/libtest/test1022.pl ../curl-config %LOGDIR/stdout%TESTNUMBER vernum
-</postcheck>
</client>
#
# Verify data after the test has been "shot"
<verify>
+<postcheck>
+%SRCDIR/libtest/test1022.pl ../curl-config %LOGDIR/stdout%TESTNUMBER vernum
+</postcheck>
<errorcode>
0
</errorcode>
<command>
--manual
</command>
-# Search for these two sentinel lines in the manual output; if they are found,
-# then chances are good the entire manual is there.
-<postcheck>
-perl -e 'open(IN,$ARGV[0]); my $lines=grep(/(curl\s*-\s*transfer\sa\s*URL)|(AUTHORS)/, <IN>); exit ($lines != 2); # Let this file pass an XML syntax check: </IN>' %LOGDIR/stdout%TESTNUMBER
-</postcheck>
</client>
#
# Verify data after the test has been "shot"
<verify>
+# Search for these two sentinel lines in the manual output; if they are found,
+# then chances are good the entire manual is there.
+<postcheck>
+perl -e 'open(IN,$ARGV[0]); my $lines=grep(/(curl\s*-\s*transfer\sa\s*URL)|(AUTHORS)/, <IN>); exit ($lines != 2); # Let this file pass an XML syntax check: </IN>' %LOGDIR/stdout%TESTNUMBER
+</postcheck>
<errorcode>
0
</errorcode>
<command>
--help
</command>
-# Search for these two sentinel lines in the help output; if they are found,
-# then chances are good the entire help is there.
-<postcheck>
-perl -e 'open(IN,$ARGV[0]); my $lines=grep(/(Usage: curl )|(--version\s*Show version)/, <IN>); exit ($lines != 2); # Let this file pass an XML syntax check: </IN>' %LOGDIR/stdout%TESTNUMBER
-</postcheck>
</client>
#
<errorcode>
0
</errorcode>
+# Search for these two sentinel lines in the help output; if they are found,
+# then chances are good the entire help is there.
+<postcheck>
+perl -e 'open(IN,$ARGV[0]); my $lines=grep(/(Usage: curl )|(--version\s*Show version)/, <IN>); exit ($lines != 2); # Let this file pass an XML syntax check: </IN>' %LOGDIR/stdout%TESTNUMBER
+</postcheck>
</verify>
</testcase>
<precheck>
mkdir %LOGDIR/data ; mkdir %LOGDIR/log; cp %SRCDIR/data/test1 %LOGDIR/data; echo 'test:1:Test should not run for unit test %TESTNUMBER' > %LOGDIR/test%TESTNUMBER-exclude-file
</precheck>
-<postcheck>
-grep -q "Test should not run for unit test %TESTNUMBER" %LOGDIR/stdout%TESTNUMBER
-</postcheck>
-
</client>
<verify>
<errorcode>
1
</errorcode>
+<postcheck>
+grep -q "Test should not run for unit test %TESTNUMBER" %LOGDIR/stdout%TESTNUMBER
+</postcheck>
</verify>
</testcase>
<command option="no-output,no-include">
http://%HOSTIP:%HTTPPORT/%TESTNUMBER -O -D %LOGDIR/heads%TESTNUMBER
</command>
-<postcheck>
-perl %SRCDIR/libtest/notexists.pl %LOGDIR/name%TESTNUMBER
-</postcheck>
</client>
#
<file3 name="%LOGDIR/stdout%TESTNUMBER">
</file3>
-
+<notexists>
+%LOGDIR/name%TESTNUMBER
+</notexists>
</verify>
</testcase>
<command option="no-output,no-include">
http://%HOSTIP:%HTTPPORT/%TESTNUMBER -O -D -
</command>
-<postcheck>
-perl %SRCDIR/libtest/notexists.pl %LOGDIR/name%TESTNUMBER
-</postcheck>
</client>
#
Content-Disposition: filename=name%TESTNUMBER; charset=funny; option=strange\r
\r
</file2>
-
+<notexists>>
+%LOGDIR/name%TESTNUMBER
+</notexists>
</verify>
</testcase>
<command option="no-output,no-include">
http://%HOSTIP:%HTTPPORT/%TESTNUMBER -i -O -D %LOGDIR/heads%TESTNUMBER
</command>
-<postcheck>
-perl %SRCDIR/libtest/notexists.pl %LOGDIR/name%TESTNUMBER
-</postcheck>
</client>
#
<file3 name="%LOGDIR/stdout%TESTNUMBER">
</file3>
-
+<notexists>
+%LOGDIR/name%TESTNUMBER
+</notexists>
</verify>
</testcase>
<command option="no-output,no-include">
http://%HOSTIP:%HTTPPORT/%TESTNUMBER -i -O -D -
</command>
-<postcheck>
-perl %SRCDIR/libtest/notexists.pl %LOGDIR/name%TESTNUMBER
-</postcheck>
</client>
#
Content-Disposition: filename=name%TESTNUMBER; charset=funny; option=strange\r
\r
</file2>
-
+<notexists>
+%LOGDIR/name%TESTNUMBER
+</notexists>
</verify>
</testcase>
<command option="no-output,no-include">
http://%HOSTIP:%HTTPPORT/%TESTNUMBER -i -O
</command>
-<postcheck>
-perl %SRCDIR/libtest/notexists.pl %LOGDIR/name%TESTNUMBER
-</postcheck>
</client>
#
<file2 name="%LOGDIR/stdout%TESTNUMBER">
</file2>
+<notexists>
+%LOGDIR/name%TESTNUMBER
+</notexists>
</verify>
</testcase>
<command option="no-output,no-include">
ftp://%HOSTIP:%FTPPORT/path/file%TESTNUMBER -O
</command>
-<postcheck>
-perl %SRCDIR/libtest/notexists.pl %LOGDIR/name%TESTNUMBER
-</postcheck>
</client>
# Verify data after the test has been "shot"
<file2 name="%LOGDIR/stdout%TESTNUMBER">
</file2>
-
+<notexists>
+%LOGDIR/name%TESTNUMBER
+</notexists>
</verify>
</testcase>
<command option="no-output,no-include">
ftp://%HOSTIP:%FTPPORT/path/file%TESTNUMBER -O -D %LOGDIR/heads%TESTNUMBER
</command>
-<postcheck>
-perl %SRCDIR/libtest/notexists.pl %LOGDIR/name%TESTNUMBER
-</postcheck>
</client>
# Verify data after the test has been "shot"
<file3 name="%LOGDIR/stdout%TESTNUMBER">
</file3>
-
+<notexists>
+%LOGDIR/name%TESTNUMBER
+</notexists>
</verify>
</testcase>
<command option="no-output,no-include">
ftp://%HOSTIP:%FTPPORT/path/file%TESTNUMBER -O -D -
</command>
-<postcheck>
-perl %SRCDIR/libtest/notexists.pl %LOGDIR/name%TESTNUMBER
-</postcheck>
</client>
# Verify data after the test has been "shot"
s/^(229 Entering Passive Mode \().*(\).*)/${1}stripped${2}/
</stripfile2>
+<notexists>
+%LOGDIR/name%TESTNUMBER
+</notexists>
</verify>
</testcase>
<command option="no-output,no-include">
ftp://%HOSTIP:%FTPPORT/path/file%TESTNUMBER -O -J -D %LOGDIR/heads%TESTNUMBER
</command>
-<postcheck>
-perl %SRCDIR/libtest/notexists.pl %LOGDIR/name%TESTNUMBER
-</postcheck>
</client>
# Verify data after the test has been "shot"
<file3 name="%LOGDIR/stdout%TESTNUMBER">
</file3>
+<notexists>
+%LOGDIR/name%TESTNUMBER
+</notexists>
</verify>
</testcase>
<command option="no-output,no-include">
ftp://%HOSTIP:%FTPPORT/path/file%TESTNUMBER -O -J -D -
</command>
-<postcheck>
-perl %SRCDIR/libtest/notexists.pl %LOGDIR/name%TESTNUMBER
-</postcheck>
</client>
# Verify data after the test has been "shot"
s/^(229 Entering Passive Mode \().*(\).*)/${1}stripped${2}/
</stripfile2>
+<notexists>
+%LOGDIR/name%TESTNUMBER
+</notexists>
</verify>
</testcase>
<command option="no-output,no-include">
ftp://%HOSTIP:%FTPPORT/path/file%TESTNUMBER -O -i -D %LOGDIR/heads%TESTNUMBER
</command>
-<postcheck>
-perl %SRCDIR/libtest/notexists.pl %LOGDIR/name%TESTNUMBER
-</postcheck>
</client>
# Verify data after the test has been "shot"
<file3 name="%LOGDIR/stdout%TESTNUMBER">
</file3>
+<notexists>
+%LOGDIR/name%TESTNUMBER
+</notexists>
</verify>
</testcase>
<command option="no-output,no-include">
ftp://%HOSTIP:%FTPPORT/path/file%TESTNUMBER -O -i -D -
</command>
-<postcheck>
-perl %SRCDIR/libtest/notexists.pl %LOGDIR/name%TESTNUMBER
-</postcheck>
</client>
# Verify data after the test has been "shot"
s/^(229 Entering Passive Mode \().*(\).*)/${1}stripped${2}/
</stripfile2>
+<notexists>
+%LOGDIR/name%TESTNUMBER
+</notexists>
</verify>
</testcase>
<command option="no-output,no-include">
ftp://%HOSTIP:%FTPPORT/path/file%TESTNUMBER -O -i
</command>
-<postcheck>
-perl %SRCDIR/libtest/notexists.pl %LOGDIR/name%TESTNUMBER
-</postcheck>
</client>
# Verify data after the test has been "shot"
<file2 name="%LOGDIR/stdout%TESTNUMBER">
</file2>
+<notexists>
+%LOGDIR/name%TESTNUMBER
+</notexists>
</verify>
</testcase>
<command option="no-output,no-include">
http://%HOSTIP:%HTTPPORT/%TESTNUMBER -o %LOGDIR/outfile%TESTNUMBER -D %LOGDIR/heads%TESTNUMBER
</command>
-<postcheck>
-perl %SRCDIR/libtest/notexists.pl %LOGDIR/%TESTNUMBER
-</postcheck>
</client>
#
<file3 name="%LOGDIR/stdout%TESTNUMBER">
</file3>
+<notexists>
+%LOGDIR/%TESTNUMBER
+</notexists>
</verify>
</testcase>
<command option="no-output,no-include">
http://%HOSTIP:%HTTPPORT/%TESTNUMBER -o %LOGDIR/outfile%TESTNUMBER -D -
</command>
-<postcheck>
-perl %SRCDIR/libtest/notexists.pl %LOGDIR/%TESTNUMBER
-</postcheck>
</client>
#
\r
</file2>
+<notexists>
+%LOGDIR/%TESTNUMBER
+</notexists>
</verify>
</testcase>
<command option="no-output,no-include">
http://%HOSTIP:%HTTPPORT/%TESTNUMBER -o %LOGDIR/outfile%TESTNUMBER -D %LOGDIR/heads%TESTNUMBER
</command>
-<postcheck>
-perl %SRCDIR/libtest/notexists.pl %LOGDIR/%TESTNUMBER %LOGDIR/name%TESTNUMBER
-</postcheck>
</client>
#
<file3 name="%LOGDIR/stdout%TESTNUMBER">
</file3>
+<notexists>
+%LOGDIR/%TESTNUMBER
+%LOGDIR/name%TESTNUMBER
+</notexists>
</verify>
</testcase>
<command option="no-output,no-include">
http://%HOSTIP:%HTTPPORT/%TESTNUMBER -o %LOGDIR/outfile%TESTNUMBER -D -
</command>
-<postcheck>
-perl %SRCDIR/libtest/notexists.pl %LOGDIR/%TESTNUMBER %LOGDIR/name%TESTNUMBER
-</postcheck>
</client>
#
\r
</file2>
+<notexists>
+%LOGDIR/%TESTNUMBER
+%LOGDIR/name%TESTNUMBER
+</notexists>
</verify>
</testcase>
<command option="no-output,no-include">
http://%HOSTIP:%HTTPPORT/%TESTNUMBER -J -o %LOGDIR/outfile%TESTNUMBER -D %LOGDIR/heads%TESTNUMBER
</command>
-<postcheck>
-perl %SRCDIR/libtest/notexists.pl %LOGDIR/%TESTNUMBER
-</postcheck>
</client>
#
<file3 name="%LOGDIR/stdout%TESTNUMBER">
</file3>
+<notexists>
+%LOGDIR/%TESTNUMBER
+</notexists>
</verify>
</testcase>
<command option="no-output,no-include">
http://%HOSTIP:%HTTPPORT/%TESTNUMBER -J -o %LOGDIR/outfile%TESTNUMBER -D -
</command>
-<postcheck>
-perl %SRCDIR/libtest/notexists.pl %LOGDIR/%TESTNUMBER
-</postcheck>
</client>
#
\r
</file2>
+<notexists>
+%LOGDIR/%TESTNUMBER
+</notexists>
</verify>
</testcase>
<command option="no-output,no-include">
http://%HOSTIP:%HTTPPORT/%TESTNUMBER -J -o %LOGDIR/outfile%TESTNUMBER -D %LOGDIR/heads%TESTNUMBER
</command>
-<postcheck>
-perl %SRCDIR/libtest/notexists.pl %LOGDIR/%TESTNUMBER %LOGDIR/name%TESTNUMBER
-</postcheck>
</client>
#
<file3 name="%LOGDIR/stdout%TESTNUMBER">
</file3>
+<notexists>
+%LOGDIR/%TESTNUMBER
+%LOGDIR/name%TESTNUMBER
+</notexists>
</verify>
</testcase>
<command option="no-output,no-include">
http://%HOSTIP:%HTTPPORT/%TESTNUMBER -J -o %LOGDIR/outfile%TESTNUMBER -D -
</command>
-<postcheck>
-perl %SRCDIR/libtest/notexists.pl %LOGDIR/%TESTNUMBER %LOGDIR/name%TESTNUMBER
-</postcheck>
</client>
#
\r
</file2>
+<notexists>
+%LOGDIR/%TESTNUMBER
+%LOGDIR/name%TESTNUMBER
+</notexists>
</verify>
</testcase>
<command option="no-output,no-include">
http://%HOSTIP:%HTTPPORT/%TESTNUMBER -i -o %LOGDIR/outfile%TESTNUMBER -D %LOGDIR/heads%TESTNUMBER
</command>
-<postcheck>
-perl %SRCDIR/libtest/notexists.pl %LOGDIR/%TESTNUMBER
-</postcheck>
</client>
#
<file3 name="%LOGDIR/stdout%TESTNUMBER">
</file3>
+<notexists>
+%LOGDIR/%TESTNUMBER
+</notexists>
</verify>
</testcase>
<command option="no-output,no-include">
http://%HOSTIP:%HTTPPORT/%TESTNUMBER -i -o %LOGDIR/outfile%TESTNUMBER -D -
</command>
-<postcheck>
-perl %SRCDIR/libtest/notexists.pl %LOGDIR/%TESTNUMBER
-</postcheck>
</client>
#
\r
</file2>
+<notexists>
+%LOGDIR/%TESTNUMBER
+</notexists>
</verify>
</testcase>
<command option="no-output,no-include">
http://%HOSTIP:%HTTPPORT/%TESTNUMBER -i -o %LOGDIR/outfile%TESTNUMBER -D %LOGDIR/heads%TESTNUMBER
</command>
-<postcheck>
-perl %SRCDIR/libtest/notexists.pl %LOGDIR/%TESTNUMBER %LOGDIR/name%TESTNUMBER
-</postcheck>
</client>
#
<file3 name="%LOGDIR/stdout%TESTNUMBER">
</file3>
+<notexists>
+%LOGDIR/%TESTNUMBER
+%LOGDIR/name%TESTNUMBER
+</notexists>
</verify>
</testcase>
<command option="no-output,no-include">
http://%HOSTIP:%HTTPPORT/%TESTNUMBER -i -o %LOGDIR/outfile%TESTNUMBER -D -
</command>
-<postcheck>
-perl %SRCDIR/libtest/notexists.pl %LOGDIR/%TESTNUMBER %LOGDIR/name%TESTNUMBER
-</postcheck>
</client>
#
\r
</file2>
+<notexists>
+%LOGDIR/%TESTNUMBER
+%LOGDIR/name%TESTNUMBER
+</notexists>
</verify>
</testcase>
<command option="no-output,no-include">
http://%HOSTIP:%HTTPPORT/%TESTNUMBER -i -o %LOGDIR/outfile%TESTNUMBER
</command>
-<postcheck>
-perl %SRCDIR/libtest/notexists.pl %LOGDIR/%TESTNUMBER
-</postcheck>
</client>
#
<file2 name="%LOGDIR/stdout%TESTNUMBER">
</file2>
+<notexists>
+%LOGDIR/%TESTNUMBER
+</notexists>
</verify>
</testcase>
<command option="no-output,no-include">
http://%HOSTIP:%HTTPPORT/%TESTNUMBER -i -o %LOGDIR/outfile%TESTNUMBER
</command>
-<postcheck>
-perl %SRCDIR/libtest/notexists.pl %LOGDIR/%TESTNUMBER %LOGDIR/name%TESTNUMBER
-</postcheck>
</client>
#
<file2 name="%LOGDIR/stdout%TESTNUMBER">
</file2>
+<notexists>
+%LOGDIR/%TESTNUMBER
+%LOGDIR/name%TESTNUMBER
+</notexists>
</verify>
</testcase>
<command option="no-output,no-include">
ftp://%HOSTIP:%FTPPORT/path/file%TESTNUMBER -o %LOGDIR/download%TESTNUMBER
</command>
-<postcheck>
-perl %SRCDIR/libtest/notexists.pl %LOGDIR/file%TESTNUMBER
-</postcheck>
</client>
# Verify data after the test has been "shot"
<file2 name="%LOGDIR/stdout%TESTNUMBER">
</file2>
+<notexists>
+%LOGDIR/file%TESTNUMBER
+</notexists>
</verify>
</testcase>
<command option="no-output,no-include">
ftp://%HOSTIP:%FTPPORT/path/file%TESTNUMBER -o %LOGDIR/download%TESTNUMBER -D %LOGDIR/heads%TESTNUMBER
</command>
-<postcheck>
-perl %SRCDIR/libtest/notexists.pl %LOGDIR/file%TESTNUMBER
-</postcheck>
</client>
# Verify data after the test has been "shot"
<file3 name="%LOGDIR/stdout%TESTNUMBER">
</file3>
+<notexists>
+%LOGDIR/file%TESTNUMBER
+</notexists>
</verify>
</testcase>
<command option="no-output,no-include">
ftp://%HOSTIP:%FTPPORT/path/file%TESTNUMBER -o %LOGDIR/download%TESTNUMBER -D -
</command>
-<postcheck>
-perl %SRCDIR/libtest/notexists.pl %LOGDIR/file%TESTNUMBER
-</postcheck>
</client>
# Verify data after the test has been "shot"
s/^(229 Entering Passive Mode \().*(\).*)/${1}stripped${2}/
</stripfile2>
+<notexists>
+%LOGDIR/file%TESTNUMBER
+</notexists>
</verify>
</testcase>
<command option="no-output,no-include">
ftp://%HOSTIP:%FTPPORT/path/file%TESTNUMBER -o %LOGDIR/download%TESTNUMBER -J -D %LOGDIR/heads%TESTNUMBER
</command>
-<postcheck>
-perl %SRCDIR/libtest/notexists.pl %LOGDIR/file%TESTNUMBER
-</postcheck>
</client>
# Verify data after the test has been "shot"
<file3 name="%LOGDIR/stdout%TESTNUMBER">
</file3>
+<notexists>
+%LOGDIR/file%TESTNUMBER
+</notexists>
</verify>
</testcase>
<command option="no-output,no-include">
ftp://%HOSTIP:%FTPPORT/path/file%TESTNUMBER -o %LOGDIR/download%TESTNUMBER -J -D -
</command>
-<postcheck>
-perl %SRCDIR/libtest/notexists.pl %LOGDIR/file%TESTNUMBER
-</postcheck>
</client>
# Verify data after the test has been "shot"
s/^(229 Entering Passive Mode \().*(\).*)/${1}stripped${2}/
</stripfile2>
+<notexists>
+%LOGDIR/file%TESTNUMBER
+</notexists>
</verify>
</testcase>
<command option="no-output,no-include">
ftp://%HOSTIP:%FTPPORT/path/file%TESTNUMBER -o %LOGDIR/download%TESTNUMBER -i -D %LOGDIR/heads%TESTNUMBER
</command>
-<postcheck>
-perl %SRCDIR/libtest/notexists.pl %LOGDIR/file%TESTNUMBER
-</postcheck>
</client>
# Verify data after the test has been "shot"
<file3 name="%LOGDIR/stdout%TESTNUMBER">
</file3>
+<notexists>
+%LOGDIR/file%TESTNUMBER
+</notexists>
</verify>
</testcase>
<command option="no-output,no-include">
ftp://%HOSTIP:%FTPPORT/path/file%TESTNUMBER -o %LOGDIR/download%TESTNUMBER -i -D -
</command>
-<postcheck>
-perl %SRCDIR/libtest/notexists.pl %LOGDIR/file%TESTNUMBER
-</postcheck>
</client>
# Verify data after the test has been "shot"
s/^(229 Entering Passive Mode \().*(\).*)/${1}stripped${2}/
</stripfile2>
+<notexists>
+%LOGDIR/file%TESTNUMBER
+</notexists>
</verify>
</testcase>
<command option="no-output,no-include">
ftp://%HOSTIP:%FTPPORT/path/file%TESTNUMBER -o %LOGDIR/download%TESTNUMBER -i
</command>
-<postcheck>
-perl %SRCDIR/libtest/notexists.pl %LOGDIR/file%TESTNUMBER
-</postcheck>
</client>
# Verify data after the test has been "shot"
<file2 name="%LOGDIR/stdout%TESTNUMBER">
</file2>
+<notexists>
+%LOGDIR/file%TESTNUMBER
+</notexists>
</verify>
</testcase>
<command option="no-output,no-include">
ftp://%HOSTIP:%FTPPORT/path/file%TESTNUMBER -o %LOGDIR/download%TESTNUMBER
</command>
-<postcheck>
-perl %SRCDIR/libtest/notexists.pl %LOGDIR/file%TESTNUMBER %LOGDIR/name%TESTNUMBER
-</postcheck>
</client>
# Verify data after the test has been "shot"
<file2 name="%LOGDIR/stdout%TESTNUMBER">
</file2>
+<notexists>
+%LOGDIR/file%TESTNUMBER
+%LOGDIR/name%TESTNUMBER
+</notexists>
</verify>
</testcase>
<command option="no-output,no-include">
ftp://%HOSTIP:%FTPPORT/path/file%TESTNUMBER -o %LOGDIR/download%TESTNUMBER -D %LOGDIR/heads%TESTNUMBER
</command>
-<postcheck>
-perl %SRCDIR/libtest/notexists.pl %LOGDIR/file%TESTNUMBER %LOGDIR/name%TESTNUMBER
-</postcheck>
</client>
# Verify data after the test has been "shot"
<file3 name="%LOGDIR/stdout%TESTNUMBER">
</file3>
+<notexists>
+%LOGDIR/file%TESTNUMBER
+%LOGDIR/name%TESTNUMBER
+</notexists>
</verify>
</testcase>
<command option="no-output,no-include">
ftp://%HOSTIP:%FTPPORT/path/file%TESTNUMBER -o %LOGDIR/download%TESTNUMBER -D -
</command>
-<postcheck>
-perl %SRCDIR/libtest/notexists.pl %LOGDIR/file%TESTNUMBER %LOGDIR/name%TESTNUMBER
-</postcheck>
</client>
# Verify data after the test has been "shot"
<stripfile2>
s/^(229 Entering Passive Mode \().*(\).*)/${1}stripped${2}/
</stripfile2>
+<notexists>
+%LOGDIR/file%TESTNUMBER
+%LOGDIR/name%TESTNUMBER
+</notexists>
</verify>
</testcase>
<command option="no-output,no-include">
ftp://%HOSTIP:%FTPPORT/path/file%TESTNUMBER -o %LOGDIR/download%TESTNUMBER -J -D %LOGDIR/heads%TESTNUMBER
</command>
-<postcheck>
-perl %SRCDIR/libtest/notexists.pl %LOGDIR/file%TESTNUMBER %LOGDIR/name%TESTNUMBER
-</postcheck>
</client>
# Verify data after the test has been "shot"
<file3 name="%LOGDIR/stdout%TESTNUMBER">
</file3>
+<notexists>
+%LOGDIR/file%TESTNUMBER
+%LOGDIR/name%TESTNUMBER
+</notexists>
</verify>
</testcase>
<command option="no-output,no-include">
ftp://%HOSTIP:%FTPPORT/path/file%TESTNUMBER -o %LOGDIR/download%TESTNUMBER -J -D -
</command>
-<postcheck>
-perl %SRCDIR/libtest/notexists.pl %LOGDIR/file%TESTNUMBER %LOGDIR/name%TESTNUMBER
-</postcheck>
</client>
# Verify data after the test has been "shot"
s/^(229 Entering Passive Mode \().*(\).*)/${1}stripped${2}/
</stripfile2>
+<notexists>
+%LOGDIR/file%TESTNUMBER
+%LOGDIR/name%TESTNUMBER
+</notexists>
</verify>
</testcase>
<command option="no-output,no-include">
ftp://%HOSTIP:%FTPPORT/path/file%TESTNUMBER -o %LOGDIR/download%TESTNUMBER -i -D %LOGDIR/heads%TESTNUMBER
</command>
-<postcheck>
-perl %SRCDIR/libtest/notexists.pl %LOGDIR/file%TESTNUMBER %LOGDIR/name%TESTNUMBER
-</postcheck>
</client>
# Verify data after the test has been "shot"
<file3 name="%LOGDIR/stdout%TESTNUMBER">
</file3>
+<notexists>
+%LOGDIR/file%TESTNUMBER
+%LOGDIR/name%TESTNUMBER
+</notexists>
</verify>
</testcase>
<command option="no-output,no-include">
ftp://%HOSTIP:%FTPPORT/path/file%TESTNUMBER -o %LOGDIR/download%TESTNUMBER -i -D -
</command>
-<postcheck>
-perl %SRCDIR/libtest/notexists.pl %LOGDIR/file%TESTNUMBER %LOGDIR/name%TESTNUMBER
-</postcheck>
</client>
# Verify data after the test has been "shot"
s/^(229 Entering Passive Mode \().*(\).*)/${1}stripped${2}/
</stripfile2>
+<notexists>
+%LOGDIR/file%TESTNUMBER
+%LOGDIR/name%TESTNUMBER
+</notexists>
</verify>
</testcase>
<command option="no-output,no-include">
ftp://%HOSTIP:%FTPPORT/path/file%TESTNUMBER -o %LOGDIR/download%TESTNUMBER -i
</command>
-<postcheck>
-perl %SRCDIR/libtest/notexists.pl %LOGDIR/file%TESTNUMBER %LOGDIR/name%TESTNUMBER
-</postcheck>
</client>
# Verify data after the test has been "shot"
<file2 name="%LOGDIR/stdout%TESTNUMBER">
</file2>
+<notexists>
+%LOGDIR/file%TESTNUMBER
+%LOGDIR/name%TESTNUMBER
+</notexists>
</verify>
</testcase>
<command option="no-output,no-include">
http://%HOSTIP:%HTTPPORT/%TESTNUMBER -o %LOGDIR/outfile%TESTNUMBER file://%PWD/%LOGDIR/outfile%TESTNUMBER
</command>
-<postcheck>
-perl %SRCDIR/libtest/notexists.pl %LOGDIR/%TESTNUMBER
-</postcheck>
</client>
#
<file1 name="%LOGDIR/outfile%TESTNUMBER">
</file1>
+<notexists>
+%LOGDIR/%TESTNUMBER
+</notexists>
</verify>
</testcase>
</command>
# Verify the mtime of the file. The mtime is specifically chosen to be an even
# number so that it can be represented exactly on a FAT filesystem.
-<postcheck>
-perl -e 'exit((stat("%LOGDIR/%TESTNUMBER"))[9] != 960898200)'
-</postcheck>
</client>
#
<file name="%LOGDIR/%TESTNUMBER">
12345
</file>
+<postcheck>
+perl -e 'exit((stat("%LOGDIR/%TESTNUMBER"))[9] != 960898200)'
+</postcheck>
</verify>
</testcase>
<command>
ftp://%HOSTIP:%FTPPORT/%TESTNUMBER --remote-time
</command>
-# Verify the mtime of the file. The mtime is specifically chosen to be an even
-# number so that it can be represented exactly on a FAT filesystem.
-<postcheck>
-perl -e 'exit((stat("%LOGDIR/curl%TESTNUMBER.out"))[9] != 1234567890)'
-</postcheck>
</client>
# Verify data after the test has been "shot"
RETR %TESTNUMBER\r
QUIT\r
</protocol>
+# Verify the mtime of the file. The mtime is specifically chosen to be an even
+# number so that it can be represented exactly on a FAT filesystem.
+<postcheck>
+perl -e 'exit((stat("%LOGDIR/curl%TESTNUMBER.out"))[9] != 1234567890)'
+</postcheck>
</verify>
</testcase>
<command>
file://localhost%FILE_PWD/%LOGDIR/test%TESTNUMBER.dir/plainfile.txt --remote-time
</command>
-<postcheck>
-perl %SRCDIR/libtest/test613.pl postprocess %PWD/%LOGDIR/test%TESTNUMBER.dir && \
-perl -e 'exit((stat("%LOGDIR/curl%TESTNUMBER.out"))[9] != 946728000)'
-</postcheck>
</client>
# Verify data after the test has been "shot"
<verify>
+<postcheck>
+perl %SRCDIR/libtest/test613.pl postprocess %PWD/%LOGDIR/test%TESTNUMBER.dir && \
+perl -e 'exit((stat("%LOGDIR/curl%TESTNUMBER.out"))[9] != 946728000)'
+</postcheck>
</verify>
</testcase>
<command>
--key %LOGDIR/server/curl_client_key --pubkey %LOGDIR/server/curl_client_key.pub -u %USER: sftp://%HOSTIP:%SSHPORT%SSH_PWD/%LOGDIR/test%TESTNUMBER.dir/rofile.txt --insecure --remote-time
</command>
-<postcheck>
-perl %SRCDIR/libtest/test613.pl postprocess %PWD/%LOGDIR/test%TESTNUMBER.dir && \
-perl -e 'exit((stat("%LOGDIR/curl%TESTNUMBER.out"))[9] != 978264000)'
-</postcheck>
</client>
#
# Verify data after the test has been "shot"
<verify>
+<postcheck>
+perl %SRCDIR/libtest/test613.pl postprocess %PWD/%LOGDIR/test%TESTNUMBER.dir && \
+perl -e 'exit((stat("%LOGDIR/curl%TESTNUMBER.out"))[9] != 978264000)'
+</postcheck>
</verify>
</testcase>
<precheck>
perl -e 'for my $i ((1..100)) { my $filename = "%LOGDIR/exist%TESTNUMBER.$i"; open(FH, ">", $filename) or die $!; print FH "to stay the same" ; close(FH) }'
</precheck>
-<postcheck>
-perl -e 'for my $i ((1..100)) { my $filename = "%LOGDIR/exist%TESTNUMBER.$i"; open(FH, "<", $filename) or die $!; (<FH> eq "to stay the same" and <FH> eq "") or die "incorrect $filename" ; close(FH) }'
-</postcheck>
</client>
#
<file name="%LOGDIR/exist%TESTNUMBER">
to stay the same
</file>
+<postcheck>
+perl -e 'for my $i ((1..100)) { my $filename = "%LOGDIR/exist%TESTNUMBER.$i"; open(FH, "<", $filename) or die $!; (<FH> eq "to stay the same" and <FH> eq "") or die "incorrect $filename" ; close(FH) }'
+</postcheck>
</verify>
</testcase>
</command>
# Verify that the file was renamed properly, then rename the file back to what
# it was so the verify section works and the file can be cleaned up.
-<postcheck>
-perl %SRCDIR/libtest/test610.pl gone %PWD/%LOGDIR/file%TESTNUMBER.txt move %PWD/%LOGDIR/file%TESTNUMBER-renamed.txt %PWD/%LOGDIR/file%TESTNUMBER.txt
-</postcheck>
<file name="%LOGDIR/file%TESTNUMBER.txt">
Test file for rename test
</file>
<file name="%LOGDIR/file%TESTNUMBER.txt">
Test file for rename test
</file>
+<postcheck>
+perl %SRCDIR/libtest/test610.pl gone %PWD/%LOGDIR/file%TESTNUMBER.txt move %PWD/%LOGDIR/file%TESTNUMBER-renamed.txt %PWD/%LOGDIR/file%TESTNUMBER.txt
+</postcheck>
</verify>
</testcase>
<command>
--key %LOGDIR/server/curl_client_key --pubkey %LOGDIR/server/curl_client_key.pub -u %USER: -Q "-rmdir %PWD/%LOGDIR/test%TESTNUMBER.dir" sftp://%HOSTIP:%SSHPORT%SSH_PWD/%LOGDIR/file%TESTNUMBER.txt --insecure
</command>
-<postcheck>
-perl %SRCDIR/libtest/test%TESTNUMBER.pl gone %PWD/%LOGDIR/test%TESTNUMBER.dir
-</postcheck>
<file name="%LOGDIR/file%TESTNUMBER.txt">
Dummy test file for rmdir test
</file>
#
# Verify data after the test has been "shot"
<verify>
+<postcheck>
+perl %SRCDIR/libtest/test%TESTNUMBER.pl gone %PWD/%LOGDIR/test%TESTNUMBER.dir
+</postcheck>
</verify>
</testcase>
<command>
--key %LOGDIR/server/curl_client_key --pubkey %LOGDIR/server/curl_client_key.pub -u %USER: -Q "-rename %PWD/%LOGDIR/test%TESTNUMBER.dir %PWD/%LOGDIR/test%TESTNUMBER.new" sftp://%HOSTIP:%SSHPORT%SSH_PWD/%LOGDIR/file%TESTNUMBER.txt --insecure
</command>
-<postcheck>
-perl %SRCDIR/libtest/test610.pl rmdir %PWD/%LOGDIR/test%TESTNUMBER.new
-</postcheck>
<file name="%LOGDIR/file%TESTNUMBER.txt">
Dummy test file for rename test
</file>
#
# Verify data after the test has been "shot"
<verify>
+<postcheck>
+perl %SRCDIR/libtest/test610.pl rmdir %PWD/%LOGDIR/test%TESTNUMBER.new
+</postcheck>
</verify>
</testcase>
<command>
--key %LOGDIR/server/curl_client_key --pubkey %LOGDIR/server/curl_client_key.pub -u %USER: -T %LOGDIR/file%TESTNUMBER.txt -Q "-rm %PWD/%LOGDIR/file%TESTNUMBER.txt" sftp://%HOSTIP:%SSHPORT%SSH_PWD/%LOGDIR/upload.%TESTNUMBER --insecure
</command>
-<postcheck>
-perl %SRCDIR/libtest/test610.pl gone %PWD/%LOGDIR/test%TESTNUMBER.txt
-</postcheck>
<file name="%LOGDIR/file%TESTNUMBER.txt">
Dummy test file for remove test
</file>
<upload>
Dummy test file for remove test
</upload>
+<postcheck>
+perl %SRCDIR/libtest/test610.pl gone %PWD/%LOGDIR/test%TESTNUMBER.txt
+</postcheck>
</verify>
</testcase>
<command>
--key %LOGDIR/server/curl_client_key --pubkey %LOGDIR/server/curl_client_key.pub -u %USER: sftp://%HOSTIP:%SSHPORT%SSH_PWD/%LOGDIR/test%TESTNUMBER.dir/ --insecure
</command>
-<postcheck>
-perl %SRCDIR/libtest/test%TESTNUMBER.pl postprocess %PWD/%LOGDIR/test%TESTNUMBER.dir %PWD/%LOGDIR/curl%TESTNUMBER.out
-</postcheck>
</client>
#
# Verify data after the test has been "shot"
<verify>
+<postcheck>
+perl %SRCDIR/libtest/test%TESTNUMBER.pl postprocess %PWD/%LOGDIR/test%TESTNUMBER.dir %PWD/%LOGDIR/curl%TESTNUMBER.out
+</postcheck>
</verify>
</testcase>
<command>
--key %LOGDIR/server/curl_client_key --pubkey %LOGDIR/server/curl_client_key.pub -u %USER: -Q "chmod 444 %PWD/%LOGDIR/test%TESTNUMBER.dir/plainfile.txt" sftp://%HOSTIP:%SSHPORT%SSH_PWD/%LOGDIR/test%TESTNUMBER.dir/ --insecure
</command>
-<postcheck>
-perl %SRCDIR/libtest/test613.pl postprocess %PWD/%LOGDIR/test%TESTNUMBER.dir %PWD/%LOGDIR/curl%TESTNUMBER.out
-</postcheck>
</client>
#
# Verify data after the test has been "shot"
<verify>
+<postcheck>
+perl %SRCDIR/libtest/test613.pl postprocess %PWD/%LOGDIR/test%TESTNUMBER.dir %PWD/%LOGDIR/curl%TESTNUMBER.out
+</postcheck>
</verify>
</testcase>
<command>
--key %LOGDIR/server/curl_client_key --pubkey %LOGDIR/server/curl_client_key.pub -u %USER: -T %LOGDIR/file%TESTNUMBER.txt sftp://%HOSTIP:%SSHPORT%SSH_PWD/%LOGDIR/test%TESTNUMBER.dir/rofile.txt --insecure
</command>
-<postcheck>
-perl %SRCDIR/libtest/test613.pl postprocess %PWD/%LOGDIR/test%TESTNUMBER.dir
-</postcheck>
<file name="%LOGDIR/file%TESTNUMBER.txt">
Test data
for ssh upload test
<errorcode>
9
</errorcode>
+<postcheck>
+perl %SRCDIR/libtest/test613.pl postprocess %PWD/%LOGDIR/test%TESTNUMBER.dir
+</postcheck>
</verify>
</testcase>
<command>
--ftp-create-dirs --key %LOGDIR/server/curl_client_key --pubkey %LOGDIR/server/curl_client_key.pub -u %USER: -T %LOGDIR/file%TESTNUMBER.txt sftp://%HOSTIP:%SSHPORT%SSH_PWD/%LOGDIR/test%TESTNUMBER.dir/upload.%TESTNUMBER --insecure
</command>
-<postcheck>
-perl %SRCDIR/libtest/test610.pl move %PWD/%LOGDIR/test%TESTNUMBER.dir/upload.%TESTNUMBER %PWD/%LOGDIR/upload.%TESTNUMBER rmdir %PWD/%LOGDIR/test%TESTNUMBER.dir
-</postcheck>
<file name="%LOGDIR/file%TESTNUMBER.txt">
Test data
for ssh upload test
Test data
for ssh upload test
</upload>
+<postcheck>
+perl %SRCDIR/libtest/test610.pl move %PWD/%LOGDIR/test%TESTNUMBER.dir/upload.%TESTNUMBER %PWD/%LOGDIR/upload.%TESTNUMBER rmdir %PWD/%LOGDIR/test%TESTNUMBER.dir
+</postcheck>
</verify>
</testcase>
<command>
--ftp-create-dirs --key %LOGDIR/server/curl_client_key --pubkey %LOGDIR/server/curl_client_key.pub -u %USER: -T %LOGDIR/file%TESTNUMBER.txt sftp://%HOSTIP:%SSHPORT%SSH_PWD/%LOGDIR/test%TESTNUMBER.a/upload.%TESTNUMBER -T %LOGDIR/file%TESTNUMBER.txt sftp://%HOSTIP:%SSHPORT%SSH_PWD/%LOGDIR/test%TESTNUMBER.b/upload.%TESTNUMBER --insecure
</command>
-<postcheck>
-perl %SRCDIR/libtest/test610.pl move %PWD/%LOGDIR/test%TESTNUMBER.a/upload.%TESTNUMBER %PWD/%LOGDIR/upload.%TESTNUMBER rmdir %PWD/%LOGDIR/test%TESTNUMBER.a rm %PWD/%LOGDIR/test%TESTNUMBER.b/upload.%TESTNUMBER rmdir %PWD/%LOGDIR/test%TESTNUMBER.b
-</postcheck>
<file name="%LOGDIR/file%TESTNUMBER.txt">
Test data
for ssh upload test
Test data
for ssh upload test
</upload>
+<postcheck>
+perl %SRCDIR/libtest/test610.pl move %PWD/%LOGDIR/test%TESTNUMBER.a/upload.%TESTNUMBER %PWD/%LOGDIR/upload.%TESTNUMBER rmdir %PWD/%LOGDIR/test%TESTNUMBER.a rm %PWD/%LOGDIR/test%TESTNUMBER.b/upload.%TESTNUMBER rmdir %PWD/%LOGDIR/test%TESTNUMBER.b
+</postcheck>
</verify>
</testcase>
<command>
--key %LOGDIR/server/curl_client_key --pubkey %LOGDIR/server/curl_client_key.pub -u %USER: -I -Q "rm %PWD/%LOGDIR/file%TESTNUMBER.txt" sftp://%HOSTIP:%SSHPORT --insecure
</command>
-<postcheck>
-perl %SRCDIR/libtest/test610.pl gone %PWD/%LOGDIR/test%TESTNUMBER.txt
-</postcheck>
<file name="%LOGDIR/file%TESTNUMBER.txt">
Dummy test file for remove test
</file>
<verify>
<protocol>
</protocol>
+<postcheck>
+perl %SRCDIR/libtest/test610.pl gone %PWD/%LOGDIR/test%TESTNUMBER.txt
+</postcheck>
</verify>
</testcase>
<command>
--key %LOGDIR/server/curl_client_key --pubkey %LOGDIR/server/curl_client_key.pub -u %USER: -Q "-*rename %PWD/%LOGDIR/test%TESTNUMBER.dir %PWD/%LOGDIR/test%TESTNUMBER.new" sftp://%HOSTIP:%SSHPORT%SSH_PWD/%LOGDIR/file%TESTNUMBER.txt --insecure
</command>
-<postcheck>
-perl %SRCDIR/libtest/test610.pl rmdir %PWD/%LOGDIR/test%TESTNUMBER.new
-</postcheck>
<file name="%LOGDIR/file%TESTNUMBER.txt">
Dummy test file for rename test
</file>
#
# Verify data after the test has been "shot"
<verify>
+<postcheck>
+perl %SRCDIR/libtest/test610.pl rmdir %PWD/%LOGDIR/test%TESTNUMBER.new
+</postcheck>
</verify>
</testcase>
<command>
--key %LOGDIR/server/curl_client_key --pubkey %LOGDIR/server/curl_client_key.pub -u %USER: -Q "-*rename %PWD/%LOGDIR/test%TESTNUMBER-not-exists-dir %PWD/%LOGDIR/test%TESTNUMBER.new" sftp://%HOSTIP:%SSHPORT%SSH_PWD/%LOGDIR/file%TESTNUMBER.txt --insecure
</command>
-<postcheck>
-perl %SRCDIR/libtest/test610.pl rmdir %PWD/%LOGDIR/test%TESTNUMBER.dir
-</postcheck>
<file name="%LOGDIR/file%TESTNUMBER.txt">
Dummy test file for rename test
</file>
#
# Verify data after the test has been "shot"
<verify>
+<postcheck>
+perl %SRCDIR/libtest/test610.pl rmdir %PWD/%LOGDIR/test%TESTNUMBER.dir
+</postcheck>
</verify>
</testcase>
-I$(top_srcdir)/tests/libtest
EXTRA_DIST = test307.pl test610.pl test613.pl test1013.pl test1022.pl \
- notexists.pl CMakeLists.txt mk-lib1521.pl .checksrc
+ CMakeLists.txt mk-lib1521.pl .checksrc
CFLAG_CURL_SYMBOL_HIDING = @CFLAG_CURL_SYMBOL_HIDING@
+++ /dev/null
-#!/usr/bin/env perl
-#***************************************************************************
-# _ _ ____ _
-# Project ___| | | | _ \| |
-# / __| | | | |_) | |
-# | (__| |_| | _ <| |___
-# \___|\___/|_| \_\_____|
-#
-# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
-#
-# This software is licensed as described in the file COPYING, which
-# you should have received as part of this distribution. The terms
-# are also available at https://curl.se/docs/copyright.html.
-#
-# You may opt to use, copy, modify, merge, publish, distribute and/or sell
-# copies of the Software, and permit persons to whom the Software is
-# furnished to do so, under the terms of the COPYING file.
-#
-# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
-# KIND, either express or implied.
-#
-# SPDX-License-Identifier: curl
-#
-###########################################################################
-# Check that given arguments do not exist on filesystem.
-my $code = 0;
-if ($#ARGV < 0) {
- print "Usage: $0 file1 [fileN]\n";
- exit 2;
-}
-while (@ARGV) {
- my $fname = shift @ARGV;
- if (-e $fname) {
- print "Found '$fname' when not supposed to exist.\n";
- $code = 1;
- }
-}
-exit $code;
# run the postcheck command
my @postcheck= getpart("client", "postcheck");
+ if(@postcheck) {
+ die "test$testnum uses client/postcheck";
+ }
+
+ @postcheck= getpart("verify", "postcheck");
if(@postcheck) {
my $cmd = join("", @postcheck);
chomp $cmd;
$ok .= "-"; # memory not checked
}
+ my @notexists = getpart("verify", "notexists");
+ if(@notexists) {
+ # a list of directory entries that must not exist
+ my $err;
+ while (@notexists) {
+ my $fname = shift @notexists;
+ chomp $fname;
+ if (-e $fname) {
+ logmsg "Found '$fname' when not supposed to exist.\n";
+ $err++;
+ }
+ elsif($verbose) {
+ logmsg "Found '$fname' confirmed to not exist.\n";
+ }
+ }
+ if($err) {
+ return -1;
+ }
+ }
if($valgrind) {
if($usedvalgrind) {
if(!opendir(DIR, "$logdir")) {