From 80cec5a62abb2fa7f9d33d7ad80bb49f4aa1a30a Mon Sep 17 00:00:00 2001 From: Dan Fandrich Date: Thu, 6 Mar 2008 01:11:43 +0000 Subject: Fixed the test harness so it will write out zero-length data files. --- tests/FILEFORMAT | 2 +- tests/runtests.pl | 10 ++++------ 2 files changed, 5 insertions(+), 7 deletions(-) (limited to 'tests') diff --git a/tests/FILEFORMAT b/tests/FILEFORMAT index 60af98877..1be923819 100644 --- a/tests/FILEFORMAT +++ b/tests/FILEFORMAT @@ -36,7 +36,7 @@ statistical/informational purposes. 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 diff --git a/tests/runtests.pl b/tests/runtests.pl index a868b2c3a..3c7fc882a 100755 --- a/tests/runtests.pl +++ b/tests/runtests.pl @@ -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; -- cgit v1.2.3