fpc/tests/webtbs/tw1255.pp
2015-08-22 12:21:46 +00:00

36 lines
571 B
ObjectPascal

{$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}
{$ifdef haiku}
testff('/boot/system/lib/libroot.*');
{$else}
testff('/etc/host*');
{$endif}
{$else}
{$ifdef wince}
testff('\windows\calc.*');
{$else}
testff(ChangeFileExt(GetEnvironmentVariable('comspec'), '.*'));
{$endif wince}
{$endif}
end.