fpc/tests/test/units/sysutils/execansi.pp
2004-01-05 20:28:37 +00:00

27 lines
476 B
ObjectPascal

{$mode objfpc}
{$h+}
Uses Sysutils;
var cmd,cmdline : String;
i : Longint;
begin
cmd:='execedbya';
cmdline:='';
for i:=0 to 10 do
cmdline:=cmdline+'-Fu/usr/local/lib/fpc/1.0.10/units/freebsd/rtl/* ';
if ExecuteProcess(cmd,cmdline)<>0 Then
halt(1);
// test illegal command
try
ExecuteProcess('afsdfdas',cmdline)
except
// unknown command should raise an exception
halt(0);
end;
// we should never get here
halt(1);
end.