test1683 (1140B)
1 <testcase> 2 <info> 3 <keywords> 4 HTTP 5 HTTP GET 6 --no-clobber 7 </keywords> 8 </info> 9 10 # 11 # Server-side 12 <reply> 13 <data nocheck="yes"> 14 HTTP/1.0 200 OK 15 Connection: close 16 Content-Type: text/plain 17 Content-Length: 4 18 19 foo 20 </data> 21 </reply> 22 23 # 24 # Client-side 25 <client> 26 <name> 27 HTTP GET without clobber when 100 files already exist 28 </name> 29 <server> 30 http 31 </server> 32 <features> 33 http 34 </features> 35 <command option="no-output"> 36 http://%HOSTIP:%HTTPPORT/%TESTNUMBER -o %LOGDIR/exist%TESTNUMBER --no-clobber 37 </command> 38 <file name="%LOGDIR/exist%TESTNUMBER"> 39 to 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> 50 23 51 </errorcode> 52 <file name="%LOGDIR/exist%TESTNUMBER"> 53 to 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>