xref: /curl/tests/data/test1683 (revision 31a29fc6)
1<testcase>
2<info>
3<keywords>
4HTTP
5HTTP GET
6--no-clobber
7</keywords>
8</info>
9
10#
11# Server-side
12<reply>
13<data nocheck="yes">
14HTTP/1.0 200 OK
15Connection: close
16Content-Type: text/plain
17Content-Length: 4
18
19foo
20</data>
21</reply>
22
23#
24# Client-side
25<client>
26<name>
27HTTP GET without clobber when 100 files already exist
28</name>
29<server>
30http
31</server>
32<features>
33http
34</features>
35<command option="no-output">
36http://%HOSTIP:%HTTPPORT/%TESTNUMBER -o %LOGDIR/exist%TESTNUMBER --no-clobber
37</command>
38<file name="%LOGDIR/exist%TESTNUMBER">
39to stay the same
40</file>
41<precheck>
42%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) }'
43</precheck>
44</client>
45
46#
47# Verify data after the test has been "shot"
48<verify>
49<errorcode>
5023
51</errorcode>
52<file name="%LOGDIR/exist%TESTNUMBER">
53to stay the same
54</file>
55<postcheck>
56%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) }'
57</postcheck>
58</verify>
59</testcase>
60