--- ibx/trunk/fbintf/testsuite/Test1.pas 2020/07/18 10:26:30 308 +++ ibx/trunk/fbintf/testsuite/Test1.pas 2021/02/25 11:56:36 315 @@ -1,3 +1,31 @@ +(* + * Firebird Interface (fbintf) Test suite. This program is used to + * test the Firebird Pascal Interface and provide a semi-automated + * pass/fail check for each test. + * + * The contents of this file are subject to the Initial Developer's + * Public License Version 1.0 (the "License"); you may not use this + * file except in compliance with the License. You may obtain a copy + * of the License here: + * + * http://www.firebirdsql.org/index.php?op=doc&id=idpl + * + * Software distributed under the License is distributed on an "AS + * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or + * implied. See the License for the specific language governing rights + * and limitations under the License. + * + * The Initial Developer of the Original Code is Tony Whyman. + * + * The Original Code is (C) 2016 Tony Whyman, MWA Software + * (http://www.mwasoftware.co.uk). + * + * All Rights Reserved. + * + * Contributor(s): ______________________________________. + * +*) + unit Test1; {$IFDEF MSWINDOWS} {$DEFINE WINDOWS} @@ -23,16 +51,17 @@ unit Test1; interface uses - Classes, SysUtils, TestManager, IB; + Classes, SysUtils, TestApplication, FBTestApp, IB; type { TTest1 } - TTest1 = class(TTestBase) + TTest1 = class(TFBTestBase) private procedure DoQuery(Attachment: IAttachment); procedure WriteAttachmentInfo(Attachment: IAttachment); + procedure GetFBVersion(Attachment: IAttachment); public function TestTitle: AnsiString; override; procedure RunTest(CharSet: AnsiString; SQLDialect: integer); override; @@ -77,6 +106,20 @@ begin writeln(outfile,'DB Client Implementation Version = ',Attachment.getFirebirdAPI.GetImplementationVersion); end; +procedure TTest1.GetFBVersion(Attachment: IAttachment); +var Version: TStrings; + i: integer; +begin + Version := TStringList.Create; + try + Attachment.getFBVersion(Version); + for i := 0 to Version.Count - 1 do + writeln(OutFile,Version[i]); + finally + Version.Free; + end; +end; + function TTest1.TestTitle: AnsiString; begin Result := 'Test 1: Create and Drop a Database'; @@ -103,6 +146,9 @@ begin WriteDBInfo(Attachment.GetDBInformation([isc_info_db_id,isc_info_db_SQL_Dialect])); WriteAttachmentInfo(Attachment); PrintDPB(Attachment.getDPB); + writeln(OutFile,'Firebird Server Version Info'); + GetFBVersion(Attachment); + writeln(OutFile); {$IFDEF HASREQEX} {Demonstrate reconnect when database created with SQL Statement}