From 6d4c5cf1f723747649ee70d88dc67ffb4953d30b Mon Sep 17 00:00:00 2001 From: michael Date: Thu, 24 May 2007 17:53:46 +0000 Subject: [PATCH] * Patch from Graeme to correct output git-svn-id: trunk@7457 - --- packages/fcl-fpcunit/src/fpcunitreport.pp | 2 +- packages/fcl-fpcunit/src/xmltestreport.pp | 13 +++++++++---- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/packages/fcl-fpcunit/src/fpcunitreport.pp b/packages/fcl-fpcunit/src/fpcunitreport.pp index 47f28c0578..e589bce317 100644 --- a/packages/fcl-fpcunit/src/fpcunitreport.pp +++ b/packages/fcl-fpcunit/src/fpcunitreport.pp @@ -185,12 +185,12 @@ begin Inc(TSuiteResults(FResultsList[i]).Ignores); end; - constructor TCustomResultsWriter.Create(AOwner: TComponent); begin inherited Create(AOwner); FLevel := -1; FCount := 1; + FFilename := ''; FSuiteResultsStack := TSuiteResultsStack.Create; end; diff --git a/packages/fcl-fpcunit/src/xmltestreport.pp b/packages/fcl-fpcunit/src/xmltestreport.pp index 52c0272234..7a937bf0bd 100644 --- a/packages/fcl-fpcunit/src/xmltestreport.pp +++ b/packages/fcl-fpcunit/src/xmltestreport.pp @@ -238,10 +238,15 @@ begin n := FDoc.CreateElement('DateTimeRan'); n.AppendChild(FDoc.CreateTextNode(FormatDateTime('yyyy-mm-dd hh:mm:ss', Now))); lResults.AppendChild(n); - system.Assign(f, FileName); - rewrite(f); - WriteXMLFile(FDoc, f); - close(f); + + // This is so that the GUI Test Runner doesn't output text as well. + if FileName <> 'null' then + begin + system.Assign(f, FileName); + rewrite(f); + WriteXMLFile(FDoc, f); + close(f); + end; end; end.