You've already forked lazarus-ccr
csvdocument: changed testsuite commandline syntax
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@1624 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -141,14 +141,26 @@ begin
|
|||||||
WriteLn('Built in ', BuildTime, ' ms');
|
WriteLn('Built in ', BuildTime, ' ms');
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure SetupUnofficialCsvHandler(AHandler: TCSVHandler);
|
||||||
|
begin
|
||||||
|
AHandler.Delimiter := ',';
|
||||||
|
AHandler.QuoteChar := '"';
|
||||||
|
AHandler.LineEnding := #13#10;
|
||||||
|
AHandler.IgnoreOuterWhitespace := True;
|
||||||
|
AHandler.QuoteOuterWhitespace := True;
|
||||||
|
AHandler.EqualColCountPerRow := False;
|
||||||
|
end;
|
||||||
|
|
||||||
var
|
var
|
||||||
CsvDoc: TCSVDocument;
|
CsvDoc: TCSVDocument;
|
||||||
|
Param1: String;
|
||||||
begin
|
begin
|
||||||
|
Param1 := ParamStr(1);
|
||||||
WriteLn('Testing CSVDocument');
|
WriteLn('Testing CSVDocument');
|
||||||
WriteLn('-------------------');
|
WriteLn('-------------------');
|
||||||
CsvDoc := TCSVDocument.Create;
|
CsvDoc := TCSVDocument.Create;
|
||||||
|
|
||||||
if ParamStr(1) = 'p' then
|
if Pos(Param1, 'performance') = 1 then
|
||||||
begin
|
begin
|
||||||
CsvDoc.Delimiter := ';';
|
CsvDoc.Delimiter := ';';
|
||||||
CsvDoc.QuoteChar := '"';
|
CsvDoc.QuoteChar := '"';
|
||||||
@ -163,12 +175,15 @@ begin
|
|||||||
ExecTests(CsvDoc, 'rfc4180');
|
ExecTests(CsvDoc, 'rfc4180');
|
||||||
|
|
||||||
// setup for unofficial Creativyst spec
|
// setup for unofficial Creativyst spec
|
||||||
|
SetupUnofficialCsvHandler(CsvDoc);
|
||||||
ExecTests(CsvDoc, 'unofficial');
|
ExecTests(CsvDoc, 'unofficial');
|
||||||
|
|
||||||
// setup for MS Excel files
|
// setup for MS Excel files
|
||||||
|
// (todo)
|
||||||
ExecTests(CsvDoc, 'msexcel');
|
ExecTests(CsvDoc, 'msexcel');
|
||||||
|
|
||||||
// setup for OOo Calc files
|
// setup for OOo Calc files
|
||||||
|
// (todo)
|
||||||
ExecTests(CsvDoc, 'oocalc');
|
ExecTests(CsvDoc, 'oocalc');
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user