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

Comparing ibx/trunk/fbintf/testsuite/Test12.pas (file contents):
Revision 45 by tony, Tue Dec 6 10:33:46 2016 UTC vs.
Revision 60 by tony, Mon Mar 27 15:21:02 2017 UTC

# Line 1 | Line 1
1 < unit Test12;
1 > unit Test12;
2 > {$IFDEF MSWINDOWS}
3 > {$DEFINE WINDOWS}
4 > {$ENDIF}
5  
6 < {$mode objfpc}{$H+}
6 > {$IFDEF FPC}
7 > {$mode delphi}
8  
9   {$codepage UTF8}
10 + {$ENDIF}
11  
12   interface
13  
# Line 26 | Line 31 | type
31      procedure UpdateDatabase(Attachment: IAttachment);
32      procedure QueryDatabase(Attachment: IAttachment);
33    public
34 <    function TestTitle: string; override;
35 <    procedure RunTest(CharSet: string; SQLDialect: integer); override;
34 >    function TestTitle: AnsiString; override;
35 >    procedure RunTest(CharSet: AnsiString; SQLDialect: integer); override;
36    end;
37  
38   implementation
# Line 37 | Line 42 | const
42      'Create Table TestData ('+
43      'RowID Integer not null,'+
44      'Title VarChar(32) Character Set UTF8,'+
45 <    'Notes VarChar(64) Character Set ISO8859_1,'+
45 >    'Notes VarChar(64) Character Set ISO8859_1 collate FR_FR,'+
46      'BlobData Blob sub_type 1 Character Set WIN1252, '+
47      'BlobData2 Blob sub_type 1 Character Set UTF8, '+
48 <    'InClear VarChar(16) Character Set NONE, '+
48 >    'InClear VarChar(16) Character Set OCTETS, '+
49      'Primary Key(RowID)'+
50      ')';
51  
# Line 62 | Line 67 | begin
67    with Statement.GetSQLParams do
68    begin
69      ByName('rowid').AsInteger := 1;
70 +    {$IFDEF DCC}
71 +    ByName('title').AsString := UTF8Encode('Blob Test ©€');
72 +    ByName('Notes').AsString := UTF8Encode('Écoute moi');
73 +    {$ELSE}
74      ByName('title').AsString := 'Blob Test ©€';
75      ByName('Notes').AsString := 'Écoute moi';
76 +    {$ENDIF}
77      ByName('BlobData').AsString := 'Some German Special Characters like ÖÄÜöäüß';
78      ByName('BlobData2').AsBlob := Attachment.CreateBlob(Transaction,'TestData','BlobData').SetString('Some German Special Characters like ÖÄÜöäüß');
79      ByName('InClear').AsString := #$01'Test'#$0D#$C3;
# Line 81 | Line 91 | begin
91    ReportResults(Statement);
92   end;
93  
94 < function TTest12.TestTitle: string;
94 > function TTest12.TestTitle: AnsiString;
95   begin
96    Result := 'Test 12: Character Sets';
97   end;
98  
99 < procedure TTest12.RunTest(CharSet: string; SQLDialect: integer);
99 > procedure TTest12.RunTest(CharSet: AnsiString; SQLDialect: integer);
100   var DPB: IDPB;
101      Attachment: IAttachment;
102   begin

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines