execansi.pp 476 B

1234567891011121314151617181920212223242526
  1. {$mode objfpc}
  2. {$h+}
  3. Uses Sysutils;
  4. var cmd,cmdline : String;
  5. i : Longint;
  6. begin
  7. cmd:='execedbya';
  8. cmdline:='';
  9. for i:=0 to 10 do
  10. cmdline:=cmdline+'-Fu/usr/local/lib/fpc/1.0.10/units/freebsd/rtl/* ';
  11. if ExecuteProcess(cmd,cmdline)<>0 Then
  12. halt(1);
  13. // test illegal command
  14. try
  15. ExecuteProcess('afsdfdas',cmdline)
  16. except
  17. // unknown command should raise an exception
  18. halt(0);
  19. end;
  20. // we should never get here
  21. halt(1);
  22. end.