tests: apply Inoussa patches to fix errors in his tests

git-svn-id: trunk@19469 -
This commit is contained in:
paul 2011-10-12 00:53:14 +00:00
parent 216113e80d
commit e4abb1731c
3 changed files with 4 additions and 32 deletions

View File

@ -17,27 +17,16 @@ type
var
s : ts866;
i : Integer;
sa : ansistring;
ss : ShortString;
begin
sa := '123'#196#200#250;
ss := sa;
if (Length(sa) <> Length(ss)) then
doerror(1);
for i := 1 to Length(sa) do
begin
if (Byte(ss[i]) <> Byte(sa[i])) then
doerror(2)
end;
s := '123'#196#200#250;
ss := s;
if (Length(s) <> Length(ss)) then
doerror(3);
doerror(1);
for i := 1 to Length(s) do
begin
if (Byte(ss[i]) <> Byte(s[i])) then
doerror(4)
doerror(2)
end;
WriteLn('Ok');

View File

@ -16,27 +16,10 @@ type
var
x : ts850;
i : Integer;
sa : ansistring;
ua : array[0..7] of UnicodeChar;
uc : UnicodeChar;
us : UnicodeString;
begin
{$ifdef broken}
This only works if the DefaultSystemCodePage is guaranteed to be
different from utf-8 }
sa := 'abc'#$00A9#$00AE'123';
ua := sa;
for i := 1 to Length(sa) do
begin
uc := sa[i];
if (uc <> ua[i-1]) then begin
writeln(i);
doerror(1);
end;
end;
{$endif}
x := 'abc'#$00A9#$00AE'123';
ua := x;
us := x;

View File

@ -1,4 +1,4 @@
uses
uses
{$ifdef unix}
cwstring,
{$endif unix}
@ -18,7 +18,7 @@ var
x, y, z : ts850;
i : Integer;
c : Integer;
sa : ansistring;
sa : ts850;
begin
sa := 'abc'#$00A9#$00AE'123';
x := Copy(sa,1,2);