mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-31 10:10:33 +02:00
+ sqldb: db test framework:
- consolidate csv export test from issue #20268 - fix output filenames so that naming collisions are less likely git-svn-id: trunk@23165 -
This commit is contained in:
parent
1ce4f17261
commit
f62269a111
@ -42,7 +42,9 @@ type
|
|||||||
procedure TestDBFExport_DBaseIV;
|
procedure TestDBFExport_DBaseIV;
|
||||||
procedure TestDBFExport_DBaseVII;
|
procedure TestDBFExport_DBaseVII;
|
||||||
procedure TestDBFExport_FoxPro;
|
procedure TestDBFExport_FoxPro;
|
||||||
procedure TestCSVExport;
|
procedure TestCSVExport; //tests csv export with default values
|
||||||
|
procedure TestCSVExport_RFC4180WithHeader; //tests csv export with settings that match RFC4180
|
||||||
|
procedure TestCSVExport_TweakSettingsSemicolon; //tests semicolon delimited, custom country values
|
||||||
procedure TestFixedTextExport;
|
procedure TestFixedTextExport;
|
||||||
procedure TestJSONExport;
|
procedure TestJSONExport;
|
||||||
procedure TestRTFExport;
|
procedure TestRTFExport;
|
||||||
@ -169,8 +171,9 @@ begin
|
|||||||
ExportFormat:=efDBaseVII;
|
ExportFormat:=efDBaseVII;
|
||||||
ExportSettings.TableFormat:=tfDBaseVII;
|
ExportSettings.TableFormat:=tfDBaseVII;
|
||||||
// Use export subtype position to differentiate output filenames:
|
// Use export subtype position to differentiate output filenames:
|
||||||
Exporter.FileName := FExportTempDir + 'expt'+inttostr(ord(ExportFormat))+
|
Exporter.FileName := FExportTempDir + inttostr(ord(ExportFormat)) +
|
||||||
TDetailedExportExtensions[ExportFormat];
|
lowercase(rightstr(TestName,5)) +
|
||||||
|
TDetailedExportExtensions[ExportFormat];
|
||||||
Exporter.FormatSettings:=ExportSettings;
|
Exporter.FormatSettings:=ExportSettings;
|
||||||
GenericExportTest(Exporter, ExportFormat);
|
GenericExportTest(Exporter, ExportFormat);
|
||||||
AssertTrue('Output file must be created', FileExists(Exporter.FileName));
|
AssertTrue('Output file must be created', FileExists(Exporter.FileName));
|
||||||
@ -194,8 +197,9 @@ begin
|
|||||||
try
|
try
|
||||||
ExportFormat:=efDBaseIV;
|
ExportFormat:=efDBaseIV;
|
||||||
ExportSettings.TableFormat:=tfDBaseIV;
|
ExportSettings.TableFormat:=tfDBaseIV;
|
||||||
Exporter.FileName := FExportTempDir + 'expt'+inttostr(ord(ExportFormat))+
|
Exporter.FileName := FExportTempDir + inttostr(ord(ExportFormat)) +
|
||||||
TDetailedExportExtensions[ExportFormat];
|
lowercase(rightstr(TestName,5)) +
|
||||||
|
TDetailedExportExtensions[ExportFormat];
|
||||||
Exporter.FormatSettings:=ExportSettings;
|
Exporter.FormatSettings:=ExportSettings;
|
||||||
GenericExportTest(Exporter, ExportFormat);
|
GenericExportTest(Exporter, ExportFormat);
|
||||||
AssertTrue('Output file must be created', FileExists(Exporter.FileName));
|
AssertTrue('Output file must be created', FileExists(Exporter.FileName));
|
||||||
@ -219,8 +223,9 @@ begin
|
|||||||
try
|
try
|
||||||
ExportFormat:=efFoxpro;
|
ExportFormat:=efFoxpro;
|
||||||
ExportSettings.TableFormat:=tfFoxPro;
|
ExportSettings.TableFormat:=tfFoxPro;
|
||||||
Exporter.FileName := FExportTempDir + 'expt'+inttostr(ord(ExportFormat))+
|
Exporter.FileName := FExportTempDir + inttostr(ord(ExportFormat)) +
|
||||||
TDetailedExportExtensions[ExportFormat];
|
lowercase(rightstr(TestName,5)) +
|
||||||
|
TDetailedExportExtensions[ExportFormat];
|
||||||
Exporter.FormatSettings:=ExportSettings;
|
Exporter.FormatSettings:=ExportSettings;
|
||||||
GenericExportTest(Exporter, ExportFormat);
|
GenericExportTest(Exporter, ExportFormat);
|
||||||
AssertTrue('Output file must be created', FileExists(Exporter.FileName));
|
AssertTrue('Output file must be created', FileExists(Exporter.FileName));
|
||||||
@ -246,8 +251,9 @@ begin
|
|||||||
ExportFormat:=efXMLXSDAccess;
|
ExportFormat:=efXMLXSDAccess;
|
||||||
ExportSettings.CreateXSD:=false;
|
ExportSettings.CreateXSD:=false;
|
||||||
ExportSettings.DecimalSeparator:='.'; //override
|
ExportSettings.DecimalSeparator:='.'; //override
|
||||||
Exporter.FileName := FExportTempDir + 'expt'+inttostr(ord(ExportFormat))+
|
Exporter.FileName := FExportTempDir + inttostr(ord(ExportFormat)) +
|
||||||
TDetailedExportExtensions[ExportFormat];
|
lowercase(rightstr(TestName,5)) +
|
||||||
|
TDetailedExportExtensions[ExportFormat];
|
||||||
Exporter.FormatSettings:=ExportSettings;
|
Exporter.FormatSettings:=ExportSettings;
|
||||||
GenericExportTest(Exporter, ExportFormat);
|
GenericExportTest(Exporter, ExportFormat);
|
||||||
AssertTrue('Output file must be created', FileExists(Exporter.FileName));
|
AssertTrue('Output file must be created', FileExists(Exporter.FileName));
|
||||||
@ -273,8 +279,9 @@ begin
|
|||||||
ExportFormat:=efXMLXSDAccess;
|
ExportFormat:=efXMLXSDAccess;
|
||||||
ExportSettings.CreateXSD:=false;
|
ExportSettings.CreateXSD:=false;
|
||||||
ExportSettings.DecimalSeparator:=char(''); //don't override
|
ExportSettings.DecimalSeparator:=char(''); //don't override
|
||||||
Exporter.FileName := FExportTempDir + 'expt'+inttostr(ord(ExportFormat))+
|
Exporter.FileName := FExportTempDir + inttostr(ord(ExportFormat)) +
|
||||||
TDetailedExportExtensions[ExportFormat];
|
lowercase(rightstr(TestName,5)) +
|
||||||
|
TDetailedExportExtensions[ExportFormat];
|
||||||
Exporter.FormatSettings:=ExportSettings;
|
Exporter.FormatSettings:=ExportSettings;
|
||||||
GenericExportTest(Exporter, ExportFormat);
|
GenericExportTest(Exporter, ExportFormat);
|
||||||
AssertTrue('Output file must be created', FileExists(Exporter.FileName));
|
AssertTrue('Output file must be created', FileExists(Exporter.FileName));
|
||||||
@ -300,8 +307,9 @@ begin
|
|||||||
ExportFormat:=efXMLXSDAccess;
|
ExportFormat:=efXMLXSDAccess;
|
||||||
ExportSettings.CreateXSD:=true;
|
ExportSettings.CreateXSD:=true;
|
||||||
ExportSettings.DecimalSeparator:='.'; //override
|
ExportSettings.DecimalSeparator:='.'; //override
|
||||||
Exporter.FileName := FExportTempDir + 'expt'+inttostr(ord(ExportFormat))+
|
Exporter.FileName := FExportTempDir + inttostr(ord(ExportFormat)) +
|
||||||
TDetailedExportExtensions[ExportFormat];
|
lowercase(rightstr(TestName,5)) +
|
||||||
|
TDetailedExportExtensions[ExportFormat];
|
||||||
Exporter.FormatSettings:=ExportSettings;
|
Exporter.FormatSettings:=ExportSettings;
|
||||||
GenericExportTest(Exporter, ExportFormat);
|
GenericExportTest(Exporter, ExportFormat);
|
||||||
AssertTrue('Output file must be created', FileExists(Exporter.FileName));
|
AssertTrue('Output file must be created', FileExists(Exporter.FileName));
|
||||||
@ -327,8 +335,9 @@ begin
|
|||||||
ExportFormat:=efXMLXSDAccess;
|
ExportFormat:=efXMLXSDAccess;
|
||||||
ExportSettings.CreateXSD:=true;
|
ExportSettings.CreateXSD:=true;
|
||||||
ExportSettings.DecimalSeparator:=char(''); //don't override
|
ExportSettings.DecimalSeparator:=char(''); //don't override
|
||||||
Exporter.FileName := FExportTempDir + 'expt'+inttostr(ord(ExportFormat))+
|
Exporter.FileName := FExportTempDir + inttostr(ord(ExportFormat)) +
|
||||||
TDetailedExportExtensions[ExportFormat];
|
lowercase(rightstr(TestName,5)) +
|
||||||
|
TDetailedExportExtensions[ExportFormat];
|
||||||
Exporter.FormatSettings:=ExportSettings;
|
Exporter.FormatSettings:=ExportSettings;
|
||||||
GenericExportTest(Exporter, ExportFormat);
|
GenericExportTest(Exporter, ExportFormat);
|
||||||
AssertTrue('Output file must be created', FileExists(Exporter.FileName));
|
AssertTrue('Output file must be created', FileExists(Exporter.FileName));
|
||||||
@ -354,8 +363,9 @@ begin
|
|||||||
ExportSettings.ExportFormat:=ADONETCompatible;
|
ExportSettings.ExportFormat:=ADONETCompatible;
|
||||||
ExportFormat:=efXMLXSDADONet;
|
ExportFormat:=efXMLXSDADONet;
|
||||||
ExportSettings.CreateXSD:=false;
|
ExportSettings.CreateXSD:=false;
|
||||||
Exporter.FileName := FExportTempDir + 'expt'+inttostr(ord(ExportFormat))+
|
Exporter.FileName := FExportTempDir + inttostr(ord(ExportFormat)) +
|
||||||
TDetailedExportExtensions[ExportFormat];
|
lowercase(rightstr(TestName,5)) +
|
||||||
|
TDetailedExportExtensions[ExportFormat];
|
||||||
Exporter.FormatSettings:=ExportSettings;
|
Exporter.FormatSettings:=ExportSettings;
|
||||||
GenericExportTest(Exporter, ExportFormat);
|
GenericExportTest(Exporter, ExportFormat);
|
||||||
AssertTrue('Output file must be created', FileExists(Exporter.FileName));
|
AssertTrue('Output file must be created', FileExists(Exporter.FileName));
|
||||||
@ -380,8 +390,9 @@ begin
|
|||||||
ExportSettings.ExportFormat:=ADONETCompatible;
|
ExportSettings.ExportFormat:=ADONETCompatible;
|
||||||
ExportFormat:=efXMLXSDADONet;
|
ExportFormat:=efXMLXSDADONet;
|
||||||
ExportSettings.CreateXSD:=true;
|
ExportSettings.CreateXSD:=true;
|
||||||
Exporter.FileName := FExportTempDir + 'expt'+inttostr(ord(ExportFormat))+
|
Exporter.FileName := FExportTempDir + inttostr(ord(ExportFormat)) +
|
||||||
TDetailedExportExtensions[ExportFormat];
|
lowercase(rightstr(TestName,5)) +
|
||||||
|
TDetailedExportExtensions[ExportFormat];
|
||||||
Exporter.FormatSettings:=ExportSettings;
|
Exporter.FormatSettings:=ExportSettings;
|
||||||
GenericExportTest(Exporter, ExportFormat);
|
GenericExportTest(Exporter, ExportFormat);
|
||||||
AssertTrue('Output file must be created', FileExists(Exporter.FileName));
|
AssertTrue('Output file must be created', FileExists(Exporter.FileName));
|
||||||
@ -402,13 +413,80 @@ var
|
|||||||
begin
|
begin
|
||||||
Exporter := TCSVExporter.Create(nil);
|
Exporter := TCSVExporter.Create(nil);
|
||||||
ExportSettings:=TCSVFormatSettings.Create(true);
|
ExportSettings:=TCSVFormatSettings.Create(true);
|
||||||
//todo: set settings to match RFC4180 as much as possible as that is the only
|
|
||||||
// sane CSV format to test for (and perhaps Excel-compatible as far as that
|
|
||||||
// can be defined)
|
|
||||||
try
|
try
|
||||||
ExportFormat:=efCSV;
|
ExportFormat:=efCSV;
|
||||||
Exporter.FileName := FExportTempDir + 'expt'+inttostr(ord(ExportFormat))+
|
Exporter.FileName := FExportTempDir + inttostr(ord(ExportFormat)) +
|
||||||
TDetailedExportExtensions[ExportFormat];
|
lowercase(rightstr(TestName,5)) +
|
||||||
|
TDetailedExportExtensions[ExportFormat];
|
||||||
|
Exporter.FormatSettings:=ExportSettings;
|
||||||
|
GenericExportTest(Exporter, ExportFormat);
|
||||||
|
AssertTrue('Output file must be created', FileExists(Exporter.FileName));
|
||||||
|
AssertFalse('Output file must not be empty', (GetFileSize(Exporter.FileName) = 0));
|
||||||
|
finally
|
||||||
|
if (FKeepFilesAfterTest = False) then
|
||||||
|
DeleteFile(Exporter.FileName);
|
||||||
|
ExportSettings.Free;
|
||||||
|
Exporter.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TTestDBExport.TestCSVExport_RFC4180WithHeader;
|
||||||
|
var
|
||||||
|
Exporter: TCSVExporter;
|
||||||
|
ExportFormat: TDetailedExportFormats;
|
||||||
|
ExportSettings: TCSVFormatSettings;
|
||||||
|
begin
|
||||||
|
Exporter := TCSVExporter.Create(nil);
|
||||||
|
ExportSettings:=TCSVFormatSettings.Create(true);
|
||||||
|
try
|
||||||
|
ExportSettings.FieldDelimiter:=','; //RFC 4180 specified commas as delimiter
|
||||||
|
ExportSettings.HeaderRow:=true; //...allows an optional header line
|
||||||
|
ExportSettings.StringQuoteChar:='"'; //...requires quoting with " (if quoting)
|
||||||
|
// Fields containing line breaks (CRLF), double quotes,
|
||||||
|
// and commas should be enclosed in double-quotes.
|
||||||
|
// => this probably won't get tested with this test set.
|
||||||
|
ExportFormat:=efCSV;
|
||||||
|
Exporter.FileName := FExportTempDir + inttostr(ord(ExportFormat)) +
|
||||||
|
lowercase(rightstr(TestName,5)) +
|
||||||
|
TDetailedExportExtensions[ExportFormat];
|
||||||
|
Exporter.FormatSettings:=ExportSettings;
|
||||||
|
GenericExportTest(Exporter, ExportFormat);
|
||||||
|
AssertTrue('Output file must be created', FileExists(Exporter.FileName));
|
||||||
|
AssertFalse('Output file must not be empty', (GetFileSize(Exporter.FileName) = 0));
|
||||||
|
finally
|
||||||
|
if (FKeepFilesAfterTest = False) then
|
||||||
|
DeleteFile(Exporter.FileName);
|
||||||
|
ExportSettings.Free;
|
||||||
|
Exporter.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TTestDBExport.TestCSVExport_TweakSettingsSemicolon;
|
||||||
|
var
|
||||||
|
Exporter: TCSVExporter;
|
||||||
|
ExportFormat: TDetailedExportFormats;
|
||||||
|
ExportSettings: TCSVFormatSettings;
|
||||||
|
begin
|
||||||
|
Exporter := TCSVExporter.Create(nil);
|
||||||
|
ExportSettings:=TCSVFormatSettings.Create(true);
|
||||||
|
try
|
||||||
|
ExportSettings.FieldDelimiter:=';';
|
||||||
|
ExportSettings.QuoteStrings:=[qsAlways,qsSpace,qsDelimiter]; //quote everything we can
|
||||||
|
ExportSettings.StringQuoteChar:='"'; //try explicit assignment
|
||||||
|
ExportSettings.RowDelimiter:=#10; //Unix/Linux format
|
||||||
|
ExportSettings.BooleanFalse:='onwaar'; //why not a Dutch output format?
|
||||||
|
ExportSettings.BooleanTrue:='waar'; //why not a Dutch output format?
|
||||||
|
ExportSettings.CurrencyDigits:=3;
|
||||||
|
ExportSettings.CurrencySymbol:='€'; //euro sign
|
||||||
|
ExportSettings.DateFormat:='d-mm-yyyy'; //Dutch setting
|
||||||
|
ExportSettings.DateTimeFormat:='d-mm-yyyy hh:nn:ss'; //Dutch setting
|
||||||
|
ExportSettings.DecimalSeparator:=','; //another Dutch setting
|
||||||
|
ExportSettings.TimeFormat:='hh:nn:ss'; //Dutch setting
|
||||||
|
ExportSettings.IntegerFormat:='0000';//Strange but nice ;)
|
||||||
|
ExportFormat:=efCSV;
|
||||||
|
Exporter.FileName := FExportTempDir + inttostr(ord(ExportFormat)) +
|
||||||
|
lowercase(rightstr(TestName,5)) +
|
||||||
|
TDetailedExportExtensions[ExportFormat];
|
||||||
Exporter.FormatSettings:=ExportSettings;
|
Exporter.FormatSettings:=ExportSettings;
|
||||||
GenericExportTest(Exporter, ExportFormat);
|
GenericExportTest(Exporter, ExportFormat);
|
||||||
AssertTrue('Output file must be created', FileExists(Exporter.FileName));
|
AssertTrue('Output file must be created', FileExists(Exporter.FileName));
|
||||||
@ -429,8 +507,9 @@ begin
|
|||||||
Exporter := TFixedLengthExporter.Create(nil);
|
Exporter := TFixedLengthExporter.Create(nil);
|
||||||
try
|
try
|
||||||
ExportFormat:=efFixedLengthText;
|
ExportFormat:=efFixedLengthText;
|
||||||
Exporter.FileName := FExportTempDir + 'expt'+inttostr(ord(ExportFormat))+
|
Exporter.FileName := FExportTempDir + inttostr(ord(ExportFormat)) +
|
||||||
TDetailedExportExtensions[ExportFormat];
|
lowercase(rightstr(TestName,5)) +
|
||||||
|
TDetailedExportExtensions[ExportFormat];
|
||||||
GenericExportTest(Exporter, ExportFormat);
|
GenericExportTest(Exporter, ExportFormat);
|
||||||
AssertTrue('Output file must be created', FileExists(Exporter.FileName));
|
AssertTrue('Output file must be created', FileExists(Exporter.FileName));
|
||||||
AssertFalse('Output file must not be empty', (GetFileSize(Exporter.FileName) = 0));
|
AssertFalse('Output file must not be empty', (GetFileSize(Exporter.FileName) = 0));
|
||||||
@ -451,9 +530,9 @@ begin
|
|||||||
ExportSettings:=TSimpleJSONFormatSettings.Create(true);
|
ExportSettings:=TSimpleJSONFormatSettings.Create(true);
|
||||||
try
|
try
|
||||||
ExportFormat:=efJSON;
|
ExportFormat:=efJSON;
|
||||||
Exporter.FileName := FExportTempDir + 'expt'+inttostr(ord(ExportFormat))+
|
Exporter.FileName := FExportTempDir + inttostr(ord(ExportFormat)) + lowercase(rightstr(TestName,5))+
|
||||||
TDetailedExportExtensions[ExportFormat];
|
inttostr(ord(ExportFormat))+
|
||||||
Exporter.FormatSettings:=ExportSettings;
|
TDetailedExportExtensions[ExportFormat]; Exporter.FormatSettings:=ExportSettings;
|
||||||
GenericExportTest(Exporter, ExportFormat);
|
GenericExportTest(Exporter, ExportFormat);
|
||||||
AssertTrue('Output file must be created', FileExists(Exporter.FileName));
|
AssertTrue('Output file must be created', FileExists(Exporter.FileName));
|
||||||
AssertFalse('Output file must not be empty', (GetFileSize(Exporter.FileName) = 0));
|
AssertFalse('Output file must not be empty', (GetFileSize(Exporter.FileName) = 0));
|
||||||
@ -475,8 +554,9 @@ begin
|
|||||||
ExportSettings:=TRTFExportFormatSettings.Create(true);
|
ExportSettings:=TRTFExportFormatSettings.Create(true);
|
||||||
try
|
try
|
||||||
ExportFormat:=efRTF;
|
ExportFormat:=efRTF;
|
||||||
Exporter.FileName := FExportTempDir + 'expt'+inttostr(ord(ExportFormat))+
|
Exporter.FileName := FExportTempDir + inttostr(ord(ExportFormat)) +
|
||||||
TDetailedExportExtensions[ExportFormat];
|
lowercase(rightstr(TestName,5))+
|
||||||
|
TDetailedExportExtensions[ExportFormat];
|
||||||
Exporter.FormatSettings:=ExportSettings;
|
Exporter.FormatSettings:=ExportSettings;
|
||||||
GenericExportTest(Exporter, ExportFormat);
|
GenericExportTest(Exporter, ExportFormat);
|
||||||
AssertTrue('Output file must be created', FileExists(Exporter.FileName));
|
AssertTrue('Output file must be created', FileExists(Exporter.FileName));
|
||||||
@ -500,8 +580,9 @@ begin
|
|||||||
try
|
try
|
||||||
ExportSettings.TableName:='ATABLE'; //required for export to succeed
|
ExportSettings.TableName:='ATABLE'; //required for export to succeed
|
||||||
ExportFormat:=efSQL;
|
ExportFormat:=efSQL;
|
||||||
Exporter.FileName := FExportTempDir + 'expt'+inttostr(ord(ExportFormat))+
|
Exporter.FileName := FExportTempDir + inttostr(ord(ExportFormat)) +
|
||||||
TDetailedExportExtensions[ExportFormat];
|
lowercase(rightstr(TestName,5))+
|
||||||
|
TDetailedExportExtensions[ExportFormat];
|
||||||
Exporter.FormatSettings:=ExportSettings;
|
Exporter.FormatSettings:=ExportSettings;
|
||||||
GenericExportTest(Exporter, ExportFormat);
|
GenericExportTest(Exporter, ExportFormat);
|
||||||
AssertTrue('Output file must be created', FileExists(Exporter.FileName));
|
AssertTrue('Output file must be created', FileExists(Exporter.FileName));
|
||||||
@ -524,8 +605,9 @@ begin
|
|||||||
ExportSettings:=TTeXExportFormatSettings.Create(true);
|
ExportSettings:=TTeXExportFormatSettings.Create(true);
|
||||||
try
|
try
|
||||||
ExportFormat:=efTeX;
|
ExportFormat:=efTeX;
|
||||||
Exporter.FileName := FExportTempDir + 'expt'+inttostr(ord(ExportFormat))+
|
Exporter.FileName := FExportTempDir +
|
||||||
TDetailedExportExtensions[ExportFormat];
|
inttostr(ord(ExportFormat)) + lowercase(rightstr(TestName,5))+
|
||||||
|
TDetailedExportExtensions[ExportFormat];
|
||||||
Exporter.FormatSettings:=ExportSettings;
|
Exporter.FormatSettings:=ExportSettings;
|
||||||
GenericExportTest(Exporter, ExportFormat);
|
GenericExportTest(Exporter, ExportFormat);
|
||||||
AssertTrue('Output file must be created', FileExists(Exporter.FileName));
|
AssertTrue('Output file must be created', FileExists(Exporter.FileName));
|
||||||
@ -548,7 +630,8 @@ begin
|
|||||||
ExportSettings:=TSimpleXMLFormatSettings.Create(true);
|
ExportSettings:=TSimpleXMLFormatSettings.Create(true);
|
||||||
try
|
try
|
||||||
ExportFormat:=efXML;
|
ExportFormat:=efXML;
|
||||||
Exporter.FileName := FExportTempDir + 'expt'+inttostr(ord(ExportFormat))+
|
Exporter.FileName := FExportTempDir + inttostr(ord(ExportFormat)) +
|
||||||
|
lowercase(rightstr(TestName,5)) +
|
||||||
TDetailedExportExtensions[ExportFormat];
|
TDetailedExportExtensions[ExportFormat];
|
||||||
Exporter.FormatSettings:=ExportSettings;
|
Exporter.FormatSettings:=ExportSettings;
|
||||||
GenericExportTest(Exporter, ExportFormat);
|
GenericExportTest(Exporter, ExportFormat);
|
||||||
@ -573,8 +656,9 @@ begin
|
|||||||
try
|
try
|
||||||
ExportSettings.ExportFormat:=DelphiClientDataset;
|
ExportSettings.ExportFormat:=DelphiClientDataset;
|
||||||
ExportFormat:=efXMLXSDClientDataset;
|
ExportFormat:=efXMLXSDClientDataset;
|
||||||
Exporter.FileName := FExportTempDir + 'expt'+inttostr(ord(ExportFormat))+
|
Exporter.FileName := FExportTempDir + inttostr(ord(ExportFormat)) +
|
||||||
TDetailedExportExtensions[ExportFormat];
|
lowercase(rightstr(TestName,5)) +
|
||||||
|
TDetailedExportExtensions[ExportFormat];
|
||||||
Exporter.FormatSettings:=ExportSettings;
|
Exporter.FormatSettings:=ExportSettings;
|
||||||
GenericExportTest(Exporter, ExportFormat);
|
GenericExportTest(Exporter, ExportFormat);
|
||||||
AssertTrue('Output file must be created', FileExists(Exporter.FileName));
|
AssertTrue('Output file must be created', FileExists(Exporter.FileName));
|
||||||
@ -598,8 +682,9 @@ begin
|
|||||||
try
|
try
|
||||||
ExportSettings.ExportFormat:=ExcelCompatible;
|
ExportSettings.ExportFormat:=ExcelCompatible;
|
||||||
ExportFormat:=efXMLXSDExcel;
|
ExportFormat:=efXMLXSDExcel;
|
||||||
Exporter.FileName := FExportTempDir + 'expt'+inttostr(ord(ExportFormat))+
|
Exporter.FileName := FExportTempDir + inttostr(ord(ExportFormat)) +
|
||||||
TDetailedExportExtensions[ExportFormat];
|
lowercase(rightstr(TestName,5)) +
|
||||||
|
TDetailedExportExtensions[ExportFormat];
|
||||||
Exporter.FormatSettings:=ExportSettings;
|
Exporter.FormatSettings:=ExportSettings;
|
||||||
GenericExportTest(Exporter, ExportFormat);
|
GenericExportTest(Exporter, ExportFormat);
|
||||||
AssertTrue('Output file must be created', FileExists(Exporter.FileName));
|
AssertTrue('Output file must be created', FileExists(Exporter.FileName));
|
||||||
|
Loading…
Reference in New Issue
Block a user