mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-06 04:29:42 +02:00
* take care of locale decimal separator in test
git-svn-id: trunk@13423 -
This commit is contained in:
parent
04a796628c
commit
c8c3262815
@ -5,8 +5,8 @@
|
||||
uses
|
||||
SysUtils;
|
||||
|
||||
const
|
||||
csMoney = '58.195';
|
||||
var
|
||||
csMoney : string;
|
||||
|
||||
Function Format_Currency_String1(sMoney : string) : string;
|
||||
var
|
||||
@ -34,10 +34,12 @@ result := FloatToStrF(aCurrency,ffFixed,19,2);
|
||||
end;
|
||||
|
||||
begin
|
||||
csMoney:='58'+DecimalSeparator+'195';
|
||||
writeln(Format_Currency_String1(csMoney));
|
||||
writeln(Format_Currency_String2(csMoney));
|
||||
if Format_Currency_String1(csMoney)<>'58.20' then
|
||||
if Format_Currency_String1(csMoney)<>'58'+DecimalSeparator+'20' then
|
||||
halt(1);
|
||||
if Format_Currency_String2(csMoney)<>'58.20' then
|
||||
if Format_Currency_String2(csMoney)<>'58'+DecimalSeparator+'20' then
|
||||
halt(2);
|
||||
writeln('ok');
|
||||
end.
|
||||
|
Loading…
Reference in New Issue
Block a user