fpc/tests/test/units/sysutils/texec2.pp
yury cbf370008b * Added %delfiles for proper clean-up.
git-svn-id: branches/targetandroid@23491 -
2013-01-22 14:34:32 +00:00

32 lines
546 B
ObjectPascal

{%delfiles=texec1}
{$mode objfpc}
{$h+}
Uses Sysutils;
var cmd,cmdline : String;
i : Longint;
begin
{$ifdef unix}
cmd:='./texec1';
{$else}
cmd:='texec1.exe';
{$endif}
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.