Add a postcheck section to verify unintended file creation.
Remove needless <file> checks in verify section. Renumbering where appropriate.
<command option="no-output,no-include">
http://%HOSTIP:%HTTPPORT/1336 -O -D log/heads1336
</command>
+<postcheck>
+perl %SRCDIR/libtest/notexists.pl %PWD/log/name1336
+</postcheck>
</client>
#
<command option="no-output,no-include">
http://%HOSTIP:%HTTPPORT/1337 -O -D -
</command>
+<postcheck>
+perl %SRCDIR/libtest/notexists.pl %PWD/log/name1337
+</postcheck>
</client>
#
<command option="no-output,no-include">
http://%HOSTIP:%HTTPPORT/1344 -i -O -D log/heads1344
</command>
+<postcheck>
+perl %SRCDIR/libtest/notexists.pl %PWD/log/name1344
+</postcheck>
</client>
#
<command option="no-output,no-include">
http://%HOSTIP:%HTTPPORT/1345 -i -O -D -
</command>
+<postcheck>
+perl %SRCDIR/libtest/notexists.pl %PWD/log/name1345
+</postcheck>
</client>
#
<command option="no-output,no-include">
http://%HOSTIP:%HTTPPORT/1347 -i -O
</command>
+<postcheck>
+perl %SRCDIR/libtest/notexists.pl %PWD/log/name1347
+</postcheck>
</client>
#
mooo
</file1>
-<file2 name="log/heads1348">
+<file2 name="log/stdout1348">
</file2>
-<file3 name="log/stdout1348">
-</file3>
-
-<file4 name="log/name1348">
-</file4>
-
</verify>
</testcase>
<file3 name="log/stdout1349">
</file3>
-<file4 name="log/name1349">
-</file4>
-
</verify>
</testcase>
mooo
</file1>
-<file2 name="log/heads1350">
-</file2>
-
-<file3 name="log/stdout1350">
+<file2 name="log/stdout1350">
220- _ _ ____ _ \r
220- ___| | | | _ \| | \r
220- / __| | | | |_) | | \r
213 10\r
150 Binary data connection for 1350 () (10 bytes).\r
226 File transfer complete\r
-</file3>
-<stripfile3>
+</file2>
+<stripfile2>
s/^(229 Entering Passive Mode \().*(\).*)/${1}stripped${2}/
-</stripfile3>
-
-<file4 name="log/name1350">
-</file4>
+</stripfile2>
</verify>
</testcase>
curl: Saved to filename '%PWD/log/file1351'
</file3>
-<file4 name="log/name1351">
-</file4>
-
</verify>
</testcase>
mooo
</file1>
-<file2 name="log/heads1352">
-</file2>
-
-<file3 name="log/stdout1352">
+<file2 name="log/stdout1352">
220- _ _ ____ _ \r
220- ___| | | | _ \| | \r
220- / __| | | | |_) | | \r
150 Binary data connection for 1352 () (10 bytes).\r
226 File transfer complete\r
curl: Saved to filename '%PWD/log/file1352'
-</file3>
-<stripfile3>
+</file2>
+<stripfile2>
s/^(229 Entering Passive Mode \().*(\).*)/${1}stripped${2}/
-</stripfile3>
-
-<file4 name="log/name1352">
-</file4>
+</stripfile2>
</verify>
</testcase>
<file3 name="log/stdout1353">
</file3>
-<file4 name="log/name1353">
-</file4>
-
</verify>
</testcase>
mooo
</file1>
-<file2 name="log/heads1354">
-</file2>
-
-<file3 name="log/stdout1354">
+<file2 name="log/stdout1354">
220- _ _ ____ _ \r
220- ___| | | | _ \| | \r
220- / __| | | | |_) | | \r
213 10\r
150 Binary data connection for 1354 () (10 bytes).\r
226 File transfer complete\r
-</file3>
-<stripfile3>
+</file2>
+<stripfile2>
s/^(229 Entering Passive Mode \().*(\).*)/${1}stripped${2}/
-</stripfile3>
-
-<file4 name="log/name1354">
-</file4>
+</stripfile2>
</verify>
</testcase>
mooo
</file1>
-<file2 name="log/heads1355">
-</file2>
-
-<file3 name="log/stdout1355">
+<file2 name="log/stdout1355">
220- _ _ ____ _ \r
220- ___| | | | _ \| | \r
220- / __| | | | |_) | | \r
213 10\r
150 Binary data connection for 1355 () (10 bytes).\r
226 File transfer complete\r
-</file3>
-<stripfile3>
+</file2>
+<stripfile2>
s/^(229 Entering Passive Mode \().*(\).*)/${1}stripped${2}/
-</stripfile3>
-
-<file4 name="log/name1355">
-</file4>
+</stripfile2>
</verify>
</testcase>
<command option="no-output,no-include">
ftp://%HOSTIP:%FTPPORT/path/file1356 -O
</command>
+<postcheck>
+perl %SRCDIR/libtest/notexists.pl %PWD/log/name1356
+</postcheck>
</client>
# Verify data after the test has been "shot"
MOOOO
</file1>
-<file2 name="log/heads1356">
+<file2 name="log/stdout1356">
</file2>
-<file3 name="log/stdout1356">
-</file3>
-
-<file4 name="log/name1356">
-</file4>
-
</verify>
</testcase>
<command option="no-output,no-include">
ftp://%HOSTIP:%FTPPORT/path/file1357 -O -D log/heads1357
</command>
+<postcheck>
+perl %SRCDIR/libtest/notexists.pl %PWD/log/name1357
+</postcheck>
</client>
# Verify data after the test has been "shot"
<file3 name="log/stdout1357">
</file3>
-<file4 name="log/name1357">
-</file4>
-
</verify>
</testcase>
<command option="no-output,no-include">
ftp://%HOSTIP:%FTPPORT/path/file1358 -O -D -
</command>
+<postcheck>
+perl %SRCDIR/libtest/notexists.pl %PWD/log/name1358
+</postcheck>
</client>
# Verify data after the test has been "shot"
MOOOO
</file1>
-<file2 name="log/heads1358">
-</file2>
-
-<file3 name="log/stdout1358">
+<file2 name="log/stdout1358">
220- _ _ ____ _ \r
220- ___| | | | _ \| | \r
220- / __| | | | |_) | | \r
213 214\r
150 Binary data connection for 1358 () (214 bytes).\r
226 File transfer complete\r
-</file3>
-<stripfile3>
+</file2>
+<stripfile2>
s/^(229 Entering Passive Mode \().*(\).*)/${1}stripped${2}/
-</stripfile3>
-
-<file4 name="log/name1358">
-</file4>
+</stripfile2>
</verify>
</testcase>
<command option="no-output,no-include">
ftp://%HOSTIP:%FTPPORT/path/file1359 -O -J -D log/heads1359
</command>
+<postcheck>
+perl %SRCDIR/libtest/notexists.pl %PWD/log/name1359
+</postcheck>
</client>
# Verify data after the test has been "shot"
curl: Saved to filename '%PWD/log/file1359'
</file3>
-<file4 name="log/name1359">
-</file4>
-
</verify>
</testcase>
<command option="no-output,no-include">
ftp://%HOSTIP:%FTPPORT/path/file1360 -O -J -D -
</command>
+<postcheck>
+perl %SRCDIR/libtest/notexists.pl %PWD/log/name1360
+</postcheck>
</client>
# Verify data after the test has been "shot"
MOOOO
</file1>
-<file2 name="log/heads1360">
-</file2>
-
-<file3 name="log/stdout1360">
+<file2 name="log/stdout1360">
220- _ _ ____ _ \r
220- ___| | | | _ \| | \r
220- / __| | | | |_) | | \r
150 Binary data connection for 1360 () (214 bytes).\r
226 File transfer complete\r
curl: Saved to filename '%PWD/log/file1360'
-</file3>
-<stripfile3>
+</file2>
+<stripfile2>
s/^(229 Entering Passive Mode \().*(\).*)/${1}stripped${2}/
-</stripfile3>
-
-<file4 name="log/name1360">
-</file4>
+</stripfile2>
</verify>
</testcase>
<command option="no-output,no-include">
ftp://%HOSTIP:%FTPPORT/path/file1361 -O -i -D log/heads1361
</command>
+<postcheck>
+perl %SRCDIR/libtest/notexists.pl %PWD/log/name1361
+</postcheck>
</client>
# Verify data after the test has been "shot"
<file3 name="log/stdout1361">
</file3>
-<file4 name="log/name1361">
-</file4>
-
</verify>
</testcase>
<command option="no-output,no-include">
ftp://%HOSTIP:%FTPPORT/path/file1362 -O -i -D -
</command>
+<postcheck>
+perl %SRCDIR/libtest/notexists.pl %PWD/log/name1362
+</postcheck>
</client>
# Verify data after the test has been "shot"
MOOOO
</file1>
-<file2 name="log/heads1362">
-</file2>
-
-<file3 name="log/stdout1362">
+<file2 name="log/stdout1362">
220- _ _ ____ _ \r
220- ___| | | | _ \| | \r
220- / __| | | | |_) | | \r
213 214\r
150 Binary data connection for 1362 () (214 bytes).\r
226 File transfer complete\r
-</file3>
-<stripfile3>
+</file2>
+<stripfile2>
s/^(229 Entering Passive Mode \().*(\).*)/${1}stripped${2}/
-</stripfile3>
-
-<file4 name="log/name1362">
-</file4>
+</stripfile2>
</verify>
</testcase>
<command option="no-output,no-include">
ftp://%HOSTIP:%FTPPORT/path/file1363 -O -i
</command>
+<postcheck>
+perl %SRCDIR/libtest/notexists.pl %PWD/log/name1363
+</postcheck>
</client>
# Verify data after the test has been "shot"
MOOOO
</file1>
-<file2 name="log/heads1363">
-</file2>
-
-<file3 name="log/stdout1363">
+<file2 name="log/stdout1363">
220- _ _ ____ _ \r
220- ___| | | | _ \| | \r
220- / __| | | | |_) | | \r
213 214\r
150 Binary data connection for 1363 () (214 bytes).\r
226 File transfer complete\r
-</file3>
-<stripfile3>
+</file2>
+<stripfile2>
s/^(229 Entering Passive Mode \().*(\).*)/${1}stripped${2}/
-</stripfile3>
-
-<file4 name="log/name1363">
-</file4>
+</stripfile2>
</verify>
</testcase>
endif
EXTRA_DIST = test75.pl test307.pl test610.pl test613.pl test1013.pl \
-test1022.pl Makefile.inc
+test1022.pl Makefile.inc notexists.pl
CFLAG_CURL_SYMBOL_HIDING = @CFLAG_CURL_SYMBOL_HIDING@
--- /dev/null
+#!/usr/bin/env perl
+# 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;