Browse Source

* Test program

Michaël Van Canneyt 2 years ago
parent
commit
505b66b892
2 changed files with 119 additions and 0 deletions
  1. 77 0
      packages/fcl-xml/tests/testxml.lpi
  2. 42 0
      packages/fcl-xml/tests/testxml.pp

+ 77 - 0
packages/fcl-xml/tests/testxml.lpi

@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<CONFIG>
+  <ProjectOptions>
+    <Version Value="12"/>
+    <General>
+      <Flags>
+        <SaveOnlyProjectUnits Value="True"/>
+        <MainUnitHasCreateFormStatements Value="False"/>
+        <MainUnitHasTitleStatement Value="False"/>
+        <MainUnitHasScaledStatement Value="False"/>
+        <LRSInOutputDirectory Value="False"/>
+        <CompatibilityMode Value="True"/>
+      </Flags>
+      <SessionStorage Value="InProjectDir"/>
+    </General>
+    <BuildModes Count="1">
+      <Item1 Name="default" Default="True"/>
+    </BuildModes>
+    <PublishOptions>
+      <Version Value="2"/>
+    </PublishOptions>
+    <RunParams>
+      <local>
+        <CommandLineParams Value="--suite=TXMLReaderTest.Read"/>
+        <LaunchingApplication PathPlusParams="/usr/X11R6/bin/xterm -T &apos;Lazarus Run Output&apos; -e $(LazarusDir)/tools/runwait.sh $(TargetCmdLine)"/>
+      </local>
+      <FormatVersion Value="2"/>
+      <Modes Count="1">
+        <Mode0 Name="default">
+          <local>
+            <CommandLineParams Value="--suite=TXMLReaderTest.Read"/>
+            <LaunchingApplication PathPlusParams="/usr/X11R6/bin/xterm -T &apos;Lazarus Run Output&apos; -e $(LazarusDir)/tools/runwait.sh $(TargetCmdLine)"/>
+          </local>
+        </Mode0>
+      </Modes>
+    </RunParams>
+    <Units Count="3">
+      <Unit0>
+        <Filename Value="testxml.pp"/>
+        <IsPartOfProject Value="True"/>
+      </Unit0>
+      <Unit1>
+        <Filename Value="readertest.pp"/>
+        <IsPartOfProject Value="True"/>
+      </Unit1>
+      <Unit2>
+        <Filename Value="readerunit.pp"/>
+        <IsPartOfProject Value="True"/>
+      </Unit2>
+    </Units>
+  </ProjectOptions>
+  <CompilerOptions>
+    <Version Value="11"/>
+    <SearchPaths>
+      <OtherUnitFiles Value="../src"/>
+    </SearchPaths>
+    <Linking>
+      <Debugging>
+        <UseHeaptrc Value="True"/>
+        <TrashVariables Value="True"/>
+      </Debugging>
+    </Linking>
+    <Other>
+      <CustomOptions Value="-tunicodertl"/>
+    </Other>
+  </CompilerOptions>
+  <Debugging>
+    <Exceptions Count="2">
+      <Item1>
+        <Name Value="EConvertError"/>
+      </Item1>
+      <Item2>
+        <Name Value="EJSON"/>
+      </Item2>
+    </Exceptions>
+  </Debugging>
+</CONFIG>

+ 42 - 0
packages/fcl-xml/tests/testxml.pp

@@ -0,0 +1,42 @@
+{ %OPT=-S2 -Fcutf8 }
+{
+    This file is part of the Free Component Library
+
+    XML tester program
+    Copyright (c) 2022 by Michael Van Canneyt [email protected]
+
+    See the file COPYING.FPC, included in this distribution,
+    for details about the copyright.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+ **********************************************************************}
+{$mode objfpc}
+{$h+}
+program testxml;
+
+uses
+  {$ifdef unix}
+  cwstring,
+  {$endif}
+  Classes, readertest, consoletestrunner;
+
+type
+  { TLazTestRunner }
+   TMyTestRunner = class(TTestRunner)
+   protected
+     // override the protected methods of TTestRunner to customize its behavior
+   end;
+      
+var
+  Application: TMyTestRunner;
+begin
+  DefaultFormat := fPlain;
+  DefaultRunAllTests := True;
+  Application := TMyTestRunner.Create(nil);
+  Application.Initialize;
+  Application.Run;  
+  Application.Free;
+end.