summaryrefslogtreecommitdiff
path: root/fpcsrc/tests/tbs/tb0503.pp
blob: 0e59856ccd2a697a8a85d8d0a9365dc9ec7233d1 (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
31
32
33
34
35
36
37
38
39
40
41
procedure testansi;
var
  s, q: ansistring;
begin
  s := 'hell';
  s := s+'o';
  q := '"';
  q := q+'''';
  s := s + q + s + 'abc';
  if (s <> 'hello"''helloabc') then
    halt(1);
  s := 'hell';
  s := s+'o';
  s := q+s+q;
  if (s <> '"''hello"''') then
    halt(2);
end;


procedure testshort;
var
  s, q: shortstring;
begin
  s := 'hell';
  s := s+'o';
  q := '"';
  q := q+'''';
  s := s + q + s + 'abc';
  if (s <> 'hello"''helloabc') then
    halt(3);
  s := 'hell';
  s := s+'o';
  s := q+s+q;
  if (s <> '"''hello"''') then
    halt(4);
end;

begin
  testansi;
  testshort;
end.