tw1479.pp 356 B

123456789101112131415161718192021
  1. {$ifdef fpc}{$mode objfpc}{$endif}
  2. uses
  3. sysutils;
  4. const
  5. fname = 'Makefile';
  6. ThisDir = '.'+DirectorySeparator;
  7. var
  8. fn : string;
  9. begin
  10. fn:=FileSearch(fname,PathSeparator);
  11. writeln('found: ',fn);
  12. if fn<>fname then
  13. halt(1);
  14. fn:=FileSearch(ThisDir+fname,PathSeparator);
  15. writeln('found: ',fn);
  16. if fn<>ThisDir+fname then
  17. halt(1);
  18. end.