summaryrefslogtreecommitdiff
path: root/tests/test/tstring2.pp
blob: 9981bb0919b8ec50a2cbd97674eadc6d111510af (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
uses
   erroru;

procedure chararray2stringtest;

  var
     a : array[1..10,1..10,1..5] of char;
     i,j,k,l : integer;

  begin
     for i:=1 to 10 do
       a[i,i]:='Hello';
     i:=1;
     j:=2;
     k:=3;
     l:=4;
     { test register allocation }
     if (a[i,i]<>'Hello') or
       (a[j,j]<>'Hello') or
       (a[k,k]<>'Hello') or
       (a[l,l]<>'Hello') then
       do_error(1000);
   end;

begin
   writeln('Misc. shortstring tests');
   chararray2stringtest;
   writeln('Misc. shortstring tests successfully passed');
   halt(0);
end.