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

30 lines
380 B
ObjectPascal

{$ifdef unix}
uses
{$ifdef darwin}iosxwstr{$else}cwstring{$endif};
{$endif unix}
var
w : widestring;
u : unicodestring;
a : ansistring;
begin
a:='A';
w:=a;
if w[1]<>#65 then
halt(1);
a:=w;
if a[1]<>'A' then
halt(2);
writeln('ok');
a:='A';
u:=a;
if u[1]<>#65 then
halt(3);
a:=u;
if a[1]<>'A' then
halt(4);
writeln('ok');
end.