mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-29 02:53:41 +02:00

- don't parse '(' token after the type declaration inside the type block - replace parse of "string<codepage>" to "type AnsiString(codepage)" for delphi compatibility - fix tests to use "type AnsiString(codepage)" git-svn-id: trunk@19148 -
43 lines
584 B
ObjectPascal
43 lines
584 B
ObjectPascal
{$APPTYPE CONSOLE}
|
|
uses
|
|
{$ifdef unix}
|
|
cwstring,
|
|
{$endif unix}
|
|
SysUtils;
|
|
|
|
type
|
|
ts866 = type AnsiString(866);
|
|
var
|
|
a, b, c : ts866;
|
|
begin
|
|
a := '';
|
|
b := 'b2';
|
|
c := '';
|
|
c := a + b;
|
|
if (StringCodePage(c) <> 866) then
|
|
halt(1);
|
|
|
|
a := '';
|
|
b := 'b2';
|
|
c := 'azerty';
|
|
c := a + b;
|
|
if (StringCodePage(c) <> 866) then
|
|
halt(1);
|
|
|
|
a := 'x';
|
|
b := '';
|
|
c := '';
|
|
c := a + b;
|
|
if (StringCodePage(c) <> 866) then
|
|
halt(2);
|
|
|
|
a := 'x';
|
|
b := '';
|
|
c := '123';
|
|
c := a + b;
|
|
if (StringCodePage(c) <> 866) then
|
|
halt(2);
|
|
|
|
WriteLn('ok');
|
|
end.
|