summaryrefslogtreecommitdiff
path: root/fpcsrc/tests/webtbs/tw1255.pp
blob: dc6a4e2904427f67a1bda1981a98a681ff006e0b (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
{$mode objfpc}
uses
  sysutils;

procedure testff(const s: string);
var
  sr: tsearchrec;
  i : integer;
begin
  i:=0;
  if findfirst(s,faAnyFile,sr)=0 then
   repeat
     writeln(sr.name);
     inc(i);
   until findnext(sr)<>0;
  findclose(sr);
  if (i=0) then
   halt(1);
end;

begin
{$ifdef UNIX}
  testff('/etc/host*');
{$else}
  {$ifdef wince}
    testff('\windows\calc.*');
  {$else}
    testff(ChangeFileExt(GetEnvironmentVariable('comspec'), '.*'));
  {$endif wince}
{$endif}
end.