summaryrefslogtreecommitdiff
path: root/fpcsrc/tests/tbs/tb0529.pp
blob: 9dfca7e7247cc35ebbdf30271def0af1beec0624 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
{ It tests conversion from "array of char" to "array of PChar" }

function DoTest(params: array of PChar): string;
var
  i: integer;
  res: string;
begin
  res:='';
  for i:=Low(params) to High(params) do
    res:=res + params[i];
  DoTest:=res;
end;

var
  s: string;
begin
  s:=DoTest(['1', '2', '3']);
  if s <> '123' then begin
    writeln('Test failed. S=', s);
    Halt(1);
  end;
end.