mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-21 00:49:12 +02:00
parent
25d3ee2ce2
commit
7d4b3dc7aa
@ -33,7 +33,7 @@
|
|||||||
<CommandLineParams Value="--suite=TTestExpressionScanner.TestNumber"/>
|
<CommandLineParams Value="--suite=TTestExpressionScanner.TestNumber"/>
|
||||||
</local>
|
</local>
|
||||||
</RunParams>
|
</RunParams>
|
||||||
<Units Count="3">
|
<Units Count="4">
|
||||||
<Unit0>
|
<Unit0>
|
||||||
<Filename Value="fclbase-unittests.pp"/>
|
<Filename Value="fclbase-unittests.pp"/>
|
||||||
<IsPartOfProject Value="True"/>
|
<IsPartOfProject Value="True"/>
|
||||||
@ -47,6 +47,10 @@
|
|||||||
<Filename Value="testexprpars.pp"/>
|
<Filename Value="testexprpars.pp"/>
|
||||||
<IsPartOfProject Value="True"/>
|
<IsPartOfProject Value="True"/>
|
||||||
</Unit2>
|
</Unit2>
|
||||||
|
<Unit3>
|
||||||
|
<Filename Value="tcmaskutils.pp"/>
|
||||||
|
<IsPartOfProject Value="True"/>
|
||||||
|
</Unit3>
|
||||||
</Units>
|
</Units>
|
||||||
</ProjectOptions>
|
</ProjectOptions>
|
||||||
<CompilerOptions>
|
<CompilerOptions>
|
||||||
|
@ -5,7 +5,7 @@ unit tcmaskutils;
|
|||||||
interface
|
interface
|
||||||
|
|
||||||
uses
|
uses
|
||||||
Classes, SysUtils, fpcunit;
|
Classes, SysUtils, fpcunit, testregistry, maskutils;
|
||||||
|
|
||||||
Type
|
Type
|
||||||
|
|
||||||
@ -14,6 +14,8 @@ Type
|
|||||||
TTestMaskUtils = Class(TTestCase)
|
TTestMaskUtils = Class(TTestCase)
|
||||||
Published
|
Published
|
||||||
Procedure Test1;
|
Procedure Test1;
|
||||||
|
Procedure Test2;
|
||||||
|
Procedure Test3;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
@ -25,6 +27,16 @@ begin
|
|||||||
AssertEquals('H1H357-K808K-44616-YK8720',FormatMaskText('!>cccccc\-ccccc\-ccccc\-cccccc;0;*', 'H1H357K808K44616YK8720'))
|
AssertEquals('H1H357-K808K-44616-YK8720',FormatMaskText('!>cccccc\-ccccc\-ccccc\-cccccc;0;*', 'H1H357K808K44616YK8720'))
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TTestMaskUtils.Test2;
|
||||||
|
begin
|
||||||
|
AssertEquals('555. . . ',FormatMaskText('999.999.999.999','555555'));
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TTestMaskUtils.Test3;
|
||||||
|
begin
|
||||||
|
AssertEquals('555. . . ',FormatMaskText('999.999.999.999;1;_','555555'));
|
||||||
|
end;
|
||||||
|
|
||||||
initialization
|
initialization
|
||||||
RegisterTest(TTestMaskUtils);
|
RegisterTest(TTestMaskUtils);
|
||||||
end.
|
end.
|
||||||
|
Loading…
Reference in New Issue
Block a user