Fixed the test harness so it will write out zero-length data files.
authorDan Fandrich <dan@coneharvesters.com>
Thu, 6 Mar 2008 01:11:43 +0000 (01:11 +0000)
committerDan Fandrich <dan@coneharvesters.com>
Thu, 6 Mar 2008 01:11:43 +0000 (01:11 +0000)
tests/FILEFORMAT
tests/runtests.pl

index 60af988772801ad44c1e9cc1a775a921649e800c..1be923819bbf0b521845e58ace3c4df849275db8 100644 (file)
@@ -36,7 +36,7 @@ statistical/informational purposes.
 <reply>
 <data [nocheck="1"] [sendzero="yes"] [base64="yes"]>
 data to be sent to the client on its request and later verified that it arrived
-safely. Set the nocheck=1 to prevent the test script to verify the arrival
+safely. Set nocheck="1" to prevent the test script from verifying the arrival
 of this data.
 
 If the data contains 'swsclose' anywhere within the start and end tag, and
index a868b2c3a1e2032c64afaf6a061425729539bb51..3c7fc882a96504d89c4b19931eaefe335cdfbe96 100755 (executable)
@@ -1957,13 +1957,11 @@ sub singletest {
         unlink($memdump);
     }
 
+    # create a (possibly-empty) file before starting the test
     my @inputfile=getpart("client", "file");
-    if(@inputfile) {
-        # we need to generate a file before this test is invoked
-        my %fileattr = getpartattr("client", "file");
-
-        my $filename=$fileattr{'name'};
-
+    my %fileattr = getpartattr("client", "file");
+    my $filename=$fileattr{'name'};
+    if(@inputfile || $filename) {
         if(!$filename) {
             logmsg "ERROR: section client=>file has no name attribute\n";
             return -1;