summaryrefslogtreecommitdiff
path: root/fpcsrc/tests/tbs/tb0312.pp
blob: 5aee233bcc99329f56ba96e2e2e72af629c12e46 (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
{ show a problem with IOCHECK !!
  inside reset(file)
  we call reset(file,longint)
  but we also emit a call to iocheck after and this is wrong !!  PM }
program getret;

  var
      ppfile : file;

begin
{$ifndef macos}
       assign(ppfile,'this_file_probably_does_not_exist&~"#');
{$else}
       {Max 32 chars in macos fielnames}
       assign(ppfile,'this_file_probably_&~"#');
{$endif}

{$I-}
       reset(ppfile,1);
       if ioresult=0 then
         begin
{$I+}
            close(ppfile);
         end
       else
         writeln('the file does not exist') ;
{$I-}
       reset(ppfile);
       if ioresult=0 then
         begin
{$I+}
            close(ppfile);
         end
       else
         writeln('the file does not exist') ;
end.