ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/public/ibx/trunk/fbintf/testsuite/Test1.pas
(Generate patch)

Comparing ibx/trunk/fbintf/testsuite/Test1.pas (file contents):
Revision 315 by tony, Thu Feb 25 11:56:36 2021 UTC vs.
Revision 353 by tony, Sat Oct 23 14:11:37 2021 UTC

# Line 31 | Line 31 | unit Test1;
31   {$DEFINE WINDOWS}
32   {$ENDIF}
33  
34 < {Create and Drop a Database}
34 > {Test 1: Create and Drop a Database}
35   {
36   This test first attempts to create a database without specifying any parameters
37   (should fail). It then goes on to create and drop a database, print out the
# Line 60 | Line 60 | type
60    TTest1 = class(TFBTestBase)
61    private
62      procedure DoQuery(Attachment: IAttachment);
63    procedure WriteAttachmentInfo(Attachment: IAttachment);
63      procedure GetFBVersion(Attachment: IAttachment);
64    public
65      function TestTitle: AnsiString; override;
# Line 93 | Line 92 | begin
92      end;
93   end;
94  
96 procedure TTest1.WriteAttachmentInfo(Attachment: IAttachment);
97 begin
98  writeln(outfile,'DB Connect String = ',Attachment.GetConnectString);
99  writeln(outfile,'DB Charset ID = ',Attachment.GetDefaultCharSetID);
100  writeln(outfile,'DB SQL Dialect = ',Attachment.GetSQLDialect);
101  writeln(outfile,'DB Remote Protocol = ', Attachment.GetRemoteProtocol);
102  writeln(outfile,'DB ODS Major Version = ',Attachment.GetODSMajorVersion);
103  writeln(outfile,'DB ODS Minor Version = ',Attachment.GetODSMinorVersion);
104  writeln(outfile,'User Authentication Method = ',Attachment.GetAuthenticationMethod);
105  writeln(outfile,'Firebird Library Path = ',Attachment.getFirebirdAPI.GetFBLibrary.GetLibraryFilePath);
106  writeln(outfile,'DB Client Implementation Version = ',Attachment.getFirebirdAPI.GetImplementationVersion);
107 end;
108
95   procedure TTest1.GetFBVersion(Attachment: IAttachment);
96   var Version: TStrings;
97      i: integer;
# Line 141 | Line 127 | begin
127  
128    writeln(OutFile,'Creating a Database using an SQL Statement');
129    createSQL := Format('create database ''%s'' USER ''%s'' PASSWORD ''%s'' DEFAULT CHARACTER SET %s',
130 <                      [ExtractDBName(Owner.GetNewDatabaseName), Owner.GetUserName, Owner.GetPassword, CharSet]);
130 >                      [Owner.GetNewDatabaseName, Owner.GetUserName, Owner.GetPassword, CharSet]);
131    Attachment := FirebirdAPI.CreateDatabase(createSQL,SQLDialect);
132    WriteDBInfo(Attachment.GetDBInformation([isc_info_db_id,isc_info_db_SQL_Dialect]));
133    WriteAttachmentInfo(Attachment);
# Line 171 | Line 157 | begin
157    DPB.Add(isc_dpb_lc_ctype).setAsString(CharSet);
158    DPB.Add(isc_dpb_set_db_SQL_dialect).setAsByte(SQLDialect);
159  
160 <  Attachment := FirebirdAPI.CreateDatabase(ExtractDBName(Owner.GetNewDatabaseName),DPB);
160 >  Attachment := FirebirdAPI.CreateDatabase(Owner.GetNewDatabaseName,DPB);
161  
162    WriteAttachmentInfo(Attachment);
163  
# Line 183 | Line 169 | begin
169  
170    PrintDPB(DPB);
171    writeln(OutFile,'Creating a Database with a DPD');
172 <  Attachment := FirebirdAPI.CreateDatabase(ExtractDBName(Owner.GetNewDatabaseName),DPB);
172 >  Attachment := FirebirdAPI.CreateDatabase(Owner.GetNewDatabaseName,DPB);
173    if Attachment = nil then
174    begin
175      writeln(OutFile,'Create Database Failed');
# Line 204 | Line 190 | begin
190      FBLibrary := LoadFBLibrary(libpath);
191  
192      writeln(OutFile,'Creating a Database with a DPD using Firebird Library in ',libpath);
193 <    Attachment := FBLibrary.GetFirebirdAPI.CreateDatabase(ExtractDBName(Owner.GetNewDatabaseName),DPB);
193 >    Attachment := FBLibrary.GetFirebirdAPI.CreateDatabase(Owner.GetNewDatabaseName,DPB);
194      if Attachment = nil then
195      begin
196        writeln(OutFile,'Create Database Failed');

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines