--- ibx/trunk/fbintf/testsuite/Test11.pas 2021/02/25 11:27:14 314 +++ ibx/trunk/fbintf/testsuite/Test11.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 Test11; {$IFDEF MSWINDOWS} {$DEFINE WINDOWS} @@ -30,13 +58,13 @@ unit Test11; interface uses - Classes, SysUtils, TestManager, IB; + Classes, SysUtils, TestApplication, FBTestApp, IB; type { TTest11 } - TTest11 = class(TTestBase) + TTest11 = class(TFBTestBase) private procedure GetStatistics(Service: IServiceManager; DBName: AnsiString); procedure BackupRestore(Service: IServiceManager; DBName: AnsiString); @@ -172,7 +200,6 @@ var Req: ISRB; SQPB: ISQPB; bytesWritten: integer; bytesAvailable: integer; - i: integer; RestoreDBName: AnsiString; Attachment: IAttachment; DPB: IDPB; @@ -210,9 +237,6 @@ begin {Local Restore} writeln(OutFile,'Local Restore'); RestoreDBName := ExtractDBName(Owner.GetNewDatabaseName); - i := Pos(':',RestoreDBName); - if i > 0 then - system.Delete(RestoreDBName,1,i); Req := Service.AllocateSRB; Req.Add(isc_action_svc_restore); Req.Add(isc_spb_dbname).AsString := RestoreDBName; @@ -279,6 +303,7 @@ begin SPB.Add(isc_spb_user_name).setAsString(Owner.GetUserName); SPB.Add(isc_spb_password).setAsString(Owner.GetPassword); Service := FirebirdAPI.GetServiceManager(ServerName,TCP,SPB); + PrintSPB(Service.getSPB); GetStatistics(Service,DBName); BackupRestore(Service,DBName);