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> 42perl -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<postcheck> 45perl -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) }' 46</postcheck> 47</client> 48 49# 50# Verify data after the test has been "shot" 51<verify> 52<errorcode> 5323 54</errorcode> 55<file name="%LOGDIR/exist%TESTNUMBER"> 56to stay the same 57</file> 58</verify> 59</testcase> 60