fpc/tests/test/tcpstrconcat2.pp
2015-02-23 22:48:15 +00:00

43 lines
622 B
ObjectPascal

{$APPTYPE CONSOLE}
uses
{$ifdef unix}
{$ifdef darwin}iosxwstr{$else}cwstring{$endif},
{$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.