tests: added tests for fixing fpdoc fragments

git-svn-id: trunk@29650 -
This commit is contained in:
mattias 2011-02-22 13:29:48 +00:00
parent 5784d739e7
commit 89e2d1d812
3 changed files with 14 additions and 5 deletions

View File

@ -22,7 +22,7 @@
Abstract: Abstract:
function for testing if a xml fragment is correct for fpdoc function for testing if a xml fragment is correct for fpdoc
and if not to automatically repair it and if not to automatically repair it using heuristics.
} }
unit CTXMLFixFragment; unit CTXMLFixFragment;
@ -33,8 +33,12 @@ interface
uses uses
Classes, SysUtils, FileProcs, contnrs, BasicCodeTools; Classes, SysUtils, FileProcs, contnrs, BasicCodeTools;
procedure FixFPDocFragment(var Fragment: string; AllowTags, Fix: boolean; procedure FixFPDocFragment(var Fragment: string;
out ErrorList: TObjectList; Verbose: boolean = false); AllowTags, // for attribute values set this to false, so that all < are converted
Fix: boolean; // fix errors using heuristics creating valid xml
out ErrorList: TObjectList;
Verbose: boolean = false // write debugln to stdout
);
implementation implementation

View File

@ -39,7 +39,7 @@
<PackageName Value="LCL"/> <PackageName Value="LCL"/>
</Item4> </Item4>
</RequiredPackages> </RequiredPackages>
<Units Count="10"> <Units Count="11">
<Unit0> <Unit0>
<Filename Value="runtests.lpr"/> <Filename Value="runtests.lpr"/>
<IsPartOfProject Value="True"/> <IsPartOfProject Value="True"/>
@ -90,6 +90,11 @@
<IsPartOfProject Value="True"/> <IsPartOfProject Value="True"/>
<UnitName Value="TestCompleteBlock"/> <UnitName Value="TestCompleteBlock"/>
</Unit9> </Unit9>
<Unit10>
<Filename Value="testctxmlfixfragments.pas"/>
<IsPartOfProject Value="True"/>
<UnitName Value="TestCTXMLFixFragments"/>
</Unit10>
</Units> </Units>
</ProjectOptions> </ProjectOptions>
<CompilerOptions> <CompilerOptions>

View File

@ -24,7 +24,7 @@ uses
Classes, consoletestrunner, Classes, consoletestrunner,
testglobals, testunits, dom, testglobals, testunits, dom,
{Unit needed to set the LCL version and widget set name} {Unit needed to set the LCL version and widget set name}
LCLVersion, InterfaceBase, Interfaces; LCLVersion, InterfaceBase, Interfaces, TestCTXMLFixFragments;
type type