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