* Tests for bug ID #28201

git-svn-id: trunk@34499 -
This commit is contained in:
michael 2016-09-10 19:34:00 +00:00
parent 25d3ee2ce2
commit 7d4b3dc7aa
2 changed files with 18 additions and 2 deletions

View File

@ -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>

View File

@ -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.