fpspreadsheet: Add to the numformatparser test some more complicated formatting strings found in Excel files -> passed.

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3165 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2014-06-13 14:35:36 +00:00
parent 36765d4f9b
commit 0083c7c510

View File

@ -23,7 +23,7 @@ type
end; end;
var var
ParserTestData: Array[0..5] of TParserTestData; ParserTestData: Array[0..8] of TParserTestData;
procedure InitParserTestData; procedure InitParserTestData;
@ -98,15 +98,31 @@ begin
SollDecimals := 0; SollDecimals := 0;
SollCurrencySymbol := ''; SollCurrencySymbol := '';
end; end;
{ with ParserTestData[6] do begin
with ParserTestData[4] do begin FormatString := '[$-409]hh:mm:ss\ AM/PM;@';
FormatString := '#,##0.00 "$";-#,##0.00 "$";0.00 "$"'; SollFormatString := 'hh:nn:ss AM/PM';
SollFormatString := '#,##0.00 "$";-#,##0.00 "$";0.00 "$"'; SollNumFormat := nfLongTimeAM;
SollSectionCount := 2;
SollDecimals := 0;
SollCurrencySymbol := '';
end;
with ParserTestData[7] do begin
FormatString := '[$-F400]dd.mm.yy\ hh:mm';
SollFormatString := 'dd.mm.yy hh:nn';
SollNumFormat := nfShortDateTime;
SollSectionCount := 1;
SollDecimals := 0;
SollCurrencySymbol := '';
end;
with ParserTestData[8] do begin
FormatString := '[$€] #,##0.00;-[$€] #,##0.00;{$€} 0.00';
SollFormatString := '"€" #,##0.00;-"€" #,##0.00;"€" 0.00';
SollNumFormat := nfCurrency; SollNumFormat := nfCurrency;
SollSectionCount := 3; SollSectionCount := 3;
SollDecimals := 2; SollDecimals := 2;
SollCurrencySymbol := '$'; SollCurrencySymbol := '€';
end; end;
{
with ParserTestData[5] do begin with ParserTestData[5] do begin
FormatString := '#,##0.00 "$";-#,##0.00 "$";-'; FormatString := '#,##0.00 "$";-#,##0.00 "$";-';
SollFormatString := '#,##0.00 "$";-#,##0.00 "$";-'; SollFormatString := '#,##0.00 "$";-#,##0.00 "$";-';