Browse Source

* empty tprocess command line results on windows now in the same exception as on unix
* some code unified

git-svn-id: trunk@11343 -

florian 17 years ago
parent
commit
f5d9a9d1b7

+ 1 - 0
.gitattributes

@@ -7421,6 +7421,7 @@ tests/test/opt/treg3.pp svneol=native#text/plain
 tests/test/opt/treg4.pp svneol=native#text/plain
 tests/test/opt/treg4.pp svneol=native#text/plain
 tests/test/opt/tretopt.pp svneol=native#text/plain
 tests/test/opt/tretopt.pp svneol=native#text/plain
 tests/test/opt/tspace.pp svneol=native#text/plain
 tests/test/opt/tspace.pp svneol=native#text/plain
+tests/test/packages/fcl-process/tw11570.pp svneol=native#text/plain
 tests/test/packages/fcl-registry/tregistry1.pp svneol=native#text/plain
 tests/test/packages/fcl-registry/tregistry1.pp svneol=native#text/plain
 tests/test/packages/hash/tmdtest.pp svneol=native#text/plain
 tests/test/packages/hash/tmdtest.pp svneol=native#text/plain
 tests/test/packages/webtbs/tw10045.pp svneol=native#text/plain
 tests/test/packages/webtbs/tw10045.pp svneol=native#text/plain

+ 82 - 7
packages/fcl-process/Makefile

@@ -1,5 +1,5 @@
 #
 #
-# Don't edit, this file is generated by FPCMake Version 2.0.0 [2008/06/15]
+# Don't edit, this file is generated by FPCMake Version 2.0.0 [2008/07/07]
 #
 #
 default: all
 default: all
 MAKEFILETARGETS=i386-linux i386-go32v2 i386-win32 i386-os2 i386-freebsd i386-beos i386-haiku i386-netbsd i386-solaris i386-qnx i386-netware i386-openbsd i386-wdosx i386-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-darwin x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-darwin arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-darwin powerpc64-embedded avr-embedded armeb-linux armeb-embedded
 MAKEFILETARGETS=i386-linux i386-go32v2 i386-win32 i386-os2 i386-freebsd i386-beos i386-haiku i386-netbsd i386-solaris i386-qnx i386-netware i386-openbsd i386-wdosx i386-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-darwin x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-darwin arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-darwin powerpc64-embedded avr-embedded armeb-linux armeb-embedded
@@ -437,11 +437,14 @@ endif
 ifeq ($(FULL_TARGET),i386-linux)
 ifeq ($(FULL_TARGET),i386-linux)
 override TARGET_RSTS+=process simpleipc
 override TARGET_RSTS+=process simpleipc
 endif
 endif
+ifeq ($(FULL_TARGET),i386-go32v2)
+override TARGET_RSTS+=process simpleipc
+endif
 ifeq ($(FULL_TARGET),i386-win32)
 ifeq ($(FULL_TARGET),i386-win32)
-override TARGET_RSTS+=simpleipc
+override TARGET_RSTS+=process simpleipc
 endif
 endif
 ifeq ($(FULL_TARGET),i386-os2)
 ifeq ($(FULL_TARGET),i386-os2)
-override TARGET_RSTS+=simpleipc
+override TARGET_RSTS+=process simpleipc
 endif
 endif
 ifeq ($(FULL_TARGET),i386-freebsd)
 ifeq ($(FULL_TARGET),i386-freebsd)
 override TARGET_RSTS+=process simpleipc
 override TARGET_RSTS+=process simpleipc
@@ -461,17 +464,35 @@ endif
 ifeq ($(FULL_TARGET),i386-qnx)
 ifeq ($(FULL_TARGET),i386-qnx)
 override TARGET_RSTS+=process simpleipc
 override TARGET_RSTS+=process simpleipc
 endif
 endif
+ifeq ($(FULL_TARGET),i386-netware)
+override TARGET_RSTS+=process simpleipc
+endif
 ifeq ($(FULL_TARGET),i386-openbsd)
 ifeq ($(FULL_TARGET),i386-openbsd)
 override TARGET_RSTS+=process simpleipc
 override TARGET_RSTS+=process simpleipc
 endif
 endif
+ifeq ($(FULL_TARGET),i386-wdosx)
+override TARGET_RSTS+=process simpleipc
+endif
 ifeq ($(FULL_TARGET),i386-darwin)
 ifeq ($(FULL_TARGET),i386-darwin)
 override TARGET_RSTS+=process simpleipc
 override TARGET_RSTS+=process simpleipc
 endif
 endif
 ifeq ($(FULL_TARGET),i386-emx)
 ifeq ($(FULL_TARGET),i386-emx)
-override TARGET_RSTS+=simpleipc
+override TARGET_RSTS+=process simpleipc
+endif
+ifeq ($(FULL_TARGET),i386-watcom)
+override TARGET_RSTS+=process simpleipc
+endif
+ifeq ($(FULL_TARGET),i386-netwlibc)
+override TARGET_RSTS+=process simpleipc
 endif
 endif
 ifeq ($(FULL_TARGET),i386-wince)
 ifeq ($(FULL_TARGET),i386-wince)
-override TARGET_RSTS+=simpleipc
+override TARGET_RSTS+=process simpleipc
+endif
+ifeq ($(FULL_TARGET),i386-embedded)
+override TARGET_RSTS+=process simpleipc
+endif
+ifeq ($(FULL_TARGET),i386-symbian)
+override TARGET_RSTS+=process simpleipc
 endif
 endif
 ifeq ($(FULL_TARGET),m68k-linux)
 ifeq ($(FULL_TARGET),m68k-linux)
 override TARGET_RSTS+=process simpleipc
 override TARGET_RSTS+=process simpleipc
@@ -482,18 +503,42 @@ endif
 ifeq ($(FULL_TARGET),m68k-netbsd)
 ifeq ($(FULL_TARGET),m68k-netbsd)
 override TARGET_RSTS+=process simpleipc
 override TARGET_RSTS+=process simpleipc
 endif
 endif
+ifeq ($(FULL_TARGET),m68k-amiga)
+override TARGET_RSTS+=process simpleipc
+endif
+ifeq ($(FULL_TARGET),m68k-atari)
+override TARGET_RSTS+=process simpleipc
+endif
 ifeq ($(FULL_TARGET),m68k-openbsd)
 ifeq ($(FULL_TARGET),m68k-openbsd)
 override TARGET_RSTS+=process simpleipc
 override TARGET_RSTS+=process simpleipc
 endif
 endif
+ifeq ($(FULL_TARGET),m68k-palmos)
+override TARGET_RSTS+=process simpleipc
+endif
+ifeq ($(FULL_TARGET),m68k-embedded)
+override TARGET_RSTS+=process simpleipc
+endif
 ifeq ($(FULL_TARGET),powerpc-linux)
 ifeq ($(FULL_TARGET),powerpc-linux)
 override TARGET_RSTS+=process simpleipc
 override TARGET_RSTS+=process simpleipc
 endif
 endif
 ifeq ($(FULL_TARGET),powerpc-netbsd)
 ifeq ($(FULL_TARGET),powerpc-netbsd)
 override TARGET_RSTS+=process simpleipc
 override TARGET_RSTS+=process simpleipc
 endif
 endif
+ifeq ($(FULL_TARGET),powerpc-amiga)
+override TARGET_RSTS+=process simpleipc
+endif
+ifeq ($(FULL_TARGET),powerpc-macos)
+override TARGET_RSTS+=process simpleipc
+endif
 ifeq ($(FULL_TARGET),powerpc-darwin)
 ifeq ($(FULL_TARGET),powerpc-darwin)
 override TARGET_RSTS+=process simpleipc
 override TARGET_RSTS+=process simpleipc
 endif
 endif
+ifeq ($(FULL_TARGET),powerpc-morphos)
+override TARGET_RSTS+=process simpleipc
+endif
+ifeq ($(FULL_TARGET),powerpc-embedded)
+override TARGET_RSTS+=process simpleipc
+endif
 ifeq ($(FULL_TARGET),sparc-linux)
 ifeq ($(FULL_TARGET),sparc-linux)
 override TARGET_RSTS+=process simpleipc
 override TARGET_RSTS+=process simpleipc
 endif
 endif
@@ -503,6 +548,9 @@ endif
 ifeq ($(FULL_TARGET),sparc-solaris)
 ifeq ($(FULL_TARGET),sparc-solaris)
 override TARGET_RSTS+=process simpleipc
 override TARGET_RSTS+=process simpleipc
 endif
 endif
+ifeq ($(FULL_TARGET),sparc-embedded)
+override TARGET_RSTS+=process simpleipc
+endif
 ifeq ($(FULL_TARGET),x86_64-linux)
 ifeq ($(FULL_TARGET),x86_64-linux)
 override TARGET_RSTS+=process simpleipc
 override TARGET_RSTS+=process simpleipc
 endif
 endif
@@ -513,16 +561,34 @@ ifeq ($(FULL_TARGET),x86_64-darwin)
 override TARGET_RSTS+=process simpleipc
 override TARGET_RSTS+=process simpleipc
 endif
 endif
 ifeq ($(FULL_TARGET),x86_64-win64)
 ifeq ($(FULL_TARGET),x86_64-win64)
-override TARGET_RSTS+=simpleipc
+override TARGET_RSTS+=process simpleipc
+endif
+ifeq ($(FULL_TARGET),x86_64-embedded)
+override TARGET_RSTS+=process simpleipc
 endif
 endif
 ifeq ($(FULL_TARGET),arm-linux)
 ifeq ($(FULL_TARGET),arm-linux)
 override TARGET_RSTS+=process simpleipc
 override TARGET_RSTS+=process simpleipc
 endif
 endif
+ifeq ($(FULL_TARGET),arm-palmos)
+override TARGET_RSTS+=process simpleipc
+endif
 ifeq ($(FULL_TARGET),arm-darwin)
 ifeq ($(FULL_TARGET),arm-darwin)
 override TARGET_RSTS+=process simpleipc
 override TARGET_RSTS+=process simpleipc
 endif
 endif
 ifeq ($(FULL_TARGET),arm-wince)
 ifeq ($(FULL_TARGET),arm-wince)
-override TARGET_RSTS+=simpleipc
+override TARGET_RSTS+=process simpleipc
+endif
+ifeq ($(FULL_TARGET),arm-gba)
+override TARGET_RSTS+=process simpleipc
+endif
+ifeq ($(FULL_TARGET),arm-nds)
+override TARGET_RSTS+=process simpleipc
+endif
+ifeq ($(FULL_TARGET),arm-embedded)
+override TARGET_RSTS+=process simpleipc
+endif
+ifeq ($(FULL_TARGET),arm-symbian)
+override TARGET_RSTS+=process simpleipc
 endif
 endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override TARGET_RSTS+=process simpleipc
 override TARGET_RSTS+=process simpleipc
@@ -530,9 +596,18 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-darwin)
 ifeq ($(FULL_TARGET),powerpc64-darwin)
 override TARGET_RSTS+=process simpleipc
 override TARGET_RSTS+=process simpleipc
 endif
 endif
+ifeq ($(FULL_TARGET),powerpc64-embedded)
+override TARGET_RSTS+=process simpleipc
+endif
+ifeq ($(FULL_TARGET),avr-embedded)
+override TARGET_RSTS+=process simpleipc
+endif
 ifeq ($(FULL_TARGET),armeb-linux)
 ifeq ($(FULL_TARGET),armeb-linux)
 override TARGET_RSTS+=process simpleipc
 override TARGET_RSTS+=process simpleipc
 endif
 endif
+ifeq ($(FULL_TARGET),armeb-embedded)
+override TARGET_RSTS+=process simpleipc
+endif
 override INSTALL_FPCPACKAGE=y
 override INSTALL_FPCPACKAGE=y
 ifeq ($(FULL_TARGET),i386-linux)
 ifeq ($(FULL_TARGET),i386-linux)
 override COMPILER_OPTIONS+=-S2h
 override COMPILER_OPTIONS+=-S2h

+ 1 - 14
packages/fcl-process/Makefile.fpc

@@ -22,20 +22,7 @@ units_wince=simpleipc dbugmsg dbugintf
 units_qnx=simpleipc dbugmsg dbugintf
 units_qnx=simpleipc dbugmsg dbugintf
 units_os2=simpleipc dbugmsg dbugintf
 units_os2=simpleipc dbugmsg dbugintf
 units_emx=simpleipc dbugmsg dbugintf
 units_emx=simpleipc dbugmsg dbugintf
-rsts_beos=process simpleipc
-rsts_haiku=process simpleipc
-rsts_freebsd=process simpleipc
-rsts_darwin=process simpleipc
-rsts_solaris=process simpleipc
-rsts_netbsd=process simpleipc
-rsts_openbsd=process simpleipc
-rsts_linux=process simpleipc
-rsts_qnx=process simpleipc
-rsts_win32=simpleipc
-rsts_win64=simpleipc
-rsts_wince=simpleipc
-rsts_os2=simpleipc
-rsts_emx=simpleipc
+rsts=process simpleipc
 
 
 [compiler]
 [compiler]
 options=-S2h
 options=-S2h

+ 14 - 0
packages/fcl-process/src/process.pp

@@ -139,6 +139,20 @@ Type
 
 
 implementation
 implementation
 
 
+{$ifdef WINDOWS}
+Uses
+  Windows;
+{$endif WINDOWS}
+{$ifdef UNIX}
+uses
+   Unix,
+   Baseunix;
+{$endif UNIX}
+
+Resourcestring
+  SNoCommandLine = 'Cannot execute empty command-line';
+  SErrNoSuchProgram = 'Executable not found: "%s"';
+
 {$i process.inc}
 {$i process.inc}
 
 
 Constructor TProcess.Create (AOwner : TComponent);
 Constructor TProcess.Create (AOwner : TComponent);

+ 9 - 13
packages/fcl-process/src/unix/process.inc

@@ -1,14 +1,15 @@
 {
 {
-  Unix Process .inc.
-}
+    This file is part of the Free Component Library (FCL)
+    Copyright (c) 1999-2008 by the Free Pascal development team
 
 
-uses
-   Unix,
-   Baseunix;
+    See the file COPYING.FPC, included in this distribution,
+    for details about the copyright.
 
 
-resourcestring
-  SErrNoSuchProgram = 'Executable not found: "%s"';
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 
 
+ **********************************************************************}
 Const
 Const
   PriorityConstants : Array [TProcessPriority] of Integer =
   PriorityConstants : Array [TProcessPriority] of Integer =
                       (20,20,0,-20);
                       (20,20,0,-20);
@@ -17,8 +18,6 @@ Const
   GeometryOption : String = '-geometry';
   GeometryOption : String = '-geometry';
   TitleOption : String ='-title';
   TitleOption : String ='-title';
 
 
-
-
 procedure TProcess.CloseProcessHandles;
 procedure TProcess.CloseProcessHandles;
 
 
 begin
 begin
@@ -133,14 +132,11 @@ end;
 
 
 Function MakeCommand(P : TProcess) : PPchar;
 Function MakeCommand(P : TProcess) : PPchar;
 
 
-Const
-  SNoCommandLine = 'Cannot execute empty command-line';
-
 Var
 Var
   Cmd : String;
   Cmd : String;
   S  : TStringList;
   S  : TStringList;
   G : String;
   G : String;
-
+  
 begin
 begin
   if (P.ApplicationName='') then
   if (P.ApplicationName='') then
     begin
     begin

+ 26 - 10
packages/fcl-process/src/win/process.inc

@@ -1,8 +1,15 @@
 {
 {
-  Win32 Process .inc.
-}
+    This file is part of the Free Component Library (FCL)
+    Copyright (c) 1999-2008 by the Free Pascal development team
 
 
-uses Windows;
+    See the file COPYING.FPC, included in this distribution,
+    for details about the copyright.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+ **********************************************************************}
 
 
 Const
 Const
   PriorityConstants : Array [TProcessPriority] of Cardinal =
   PriorityConstants : Array [TProcessPriority] of Cardinal =
@@ -150,8 +157,6 @@ end;
 
 
 
 
 Procedure TProcess.Execute;
 Procedure TProcess.Execute;
-
-
 Var
 Var
   PName,PDir,PCommandLine : PChar;
   PName,PDir,PCommandLine : PChar;
   FEnv: pointer;
   FEnv: pointer;
@@ -161,16 +166,27 @@ Var
   FProcessInformation : TProcessInformation;
   FProcessInformation : TProcessInformation;
   FStartupInfo : STARTUPINFO;
   FStartupInfo : STARTUPINFO;
   HI,HO,HE : THandle;
   HI,HO,HE : THandle;
-
 begin
 begin
   FInheritHandles:=True;
   FInheritHandles:=True;
   PName:=Nil;
   PName:=Nil;
   PCommandLine:=Nil;
   PCommandLine:=Nil;
   PDir:=Nil;
   PDir:=Nil;
-  If FApplicationName<>'' then
-    PName:=Pchar(FApplicationName);
-  If FCommandLine<>'' then
-    PCommandLine:=Pchar(FCommandLine);
+    
+  if (FApplicationName='') then
+    begin
+      If (FCommandLine='') then
+        Raise EProcess.Create(SNoCommandline);
+      PCommandLine:=Pchar(FCommandLine)
+    end
+  else
+    begin
+      PName:=Pchar(FApplicationName);
+      If (FCommandLine='') then
+        PCommandLine:=Pchar(FApplicationName)
+      else
+        PCommandLine:=Pchar(FCommandLine)
+    end;
+
   If FCurrentDirectory<>'' then
   If FCurrentDirectory<>'' then
     PDir:=Pchar(FCurrentDirectory);
     PDir:=Pchar(FCurrentDirectory);
   if FEnvironment.Count<>0 then
   if FEnvironment.Count<>0 then

+ 26 - 7
packages/fcl-process/src/wince/process.inc

@@ -1,8 +1,15 @@
 {
 {
-  Wince Process .inc.
-}
+    This file is part of the Free Component Library (FCL)
+    Copyright (c) 1999-2008 by the Free Pascal development team
 
 
-uses Windows;
+    See the file COPYING.FPC, included in this distribution,
+    for details about the copyright.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+ **********************************************************************}
 
 
 Const
 Const
   PriorityConstants : Array [TProcessPriority] of Cardinal =
   PriorityConstants : Array [TProcessPriority] of Cardinal =
@@ -167,10 +174,22 @@ begin
   PName:=Nil;
   PName:=Nil;
   PCommandLine:=Nil;
   PCommandLine:=Nil;
   PDir:=Nil;
   PDir:=Nil;
-  If FApplicationName<>'' then
-    PName:=PWidechar(FApplicationName);
-  If FCommandLine<>'' then
-    PCommandLine:=PWidechar(FCommandLine);
+    
+  if (FApplicationName='') then
+    begin
+      If (FCommandLine='') then
+        Raise EProcess.Create(SNoCommandline);
+      PCommandLine:=PWidechar(FCommandLine)
+    end
+  else
+    begin
+      PName:=PWidechar(FApplicationName);
+      If (FCommandLine='') then
+        PCommandLine:=PWidechar(FApplicationName)
+      else
+        PCommandLine:=PWidechar(FCommandLine)
+    end;
+    
   If FCurrentDirectory<>'' then
   If FCurrentDirectory<>'' then
     PDir:=PWidechar(FCurrentDirectory);
     PDir:=PWidechar(FCurrentDirectory);
   if FEnvironment.Count<>0 then
   if FEnvironment.Count<>0 then

+ 2 - 2
tests/Makefile

@@ -1,5 +1,5 @@
 #
 #
-# Don't edit, this file is generated by FPCMake Version 2.0.0 [2008/06/15]
+# Don't edit, this file is generated by FPCMake Version 2.0.0 [2008/07/07]
 #
 #
 default: allexectests
 default: allexectests
 MAKEFILETARGETS=i386-linux i386-go32v2 i386-win32 i386-os2 i386-freebsd i386-beos i386-haiku i386-netbsd i386-solaris i386-qnx i386-netware i386-openbsd i386-wdosx i386-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-darwin x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-darwin arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-darwin powerpc64-embedded avr-embedded armeb-linux armeb-embedded
 MAKEFILETARGETS=i386-linux i386-go32v2 i386-win32 i386-os2 i386-freebsd i386-beos i386-haiku i386-netbsd i386-solaris i386-qnx i386-netware i386-openbsd i386-wdosx i386-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-darwin x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-darwin arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-darwin powerpc64-embedded avr-embedded armeb-linux armeb-embedded
@@ -1442,7 +1442,7 @@ ifndef LOG
 export LOG:=$(TEST_OUTPUTDIR)/log
 export LOG:=$(TEST_OUTPUTDIR)/log
 endif
 endif
 TESTSUBDIRS=cg cg/variants cg/cdecl opt units/system units/dos units/crt units/objects units/strings units/sysutils units/math units/sharemem
 TESTSUBDIRS=cg cg/variants cg/cdecl opt units/system units/dos units/crt units/objects units/strings units/sysutils units/math units/sharemem
-TESTPACKAGESUBDIRS=cg packages/win-base packages/webtbs packages/hash packages/fcl-registry
+TESTPACKAGESUBDIRS=cg packages/win-base packages/webtbs packages/hash packages/fcl-registry packages/fcl-process
 ifdef QUICKTEST
 ifdef QUICKTEST
 export QUICKTEST
 export QUICKTEST
 else
 else

+ 1 - 1
tests/Makefile.fpc

@@ -123,7 +123,7 @@ endif
 
 
 # Subdirs available in the test subdir
 # Subdirs available in the test subdir
 TESTSUBDIRS=cg cg/variants cg/cdecl opt units/system units/dos units/crt units/objects units/strings units/sysutils units/math units/sharemem
 TESTSUBDIRS=cg cg/variants cg/cdecl opt units/system units/dos units/crt units/objects units/strings units/sysutils units/math units/sharemem
-TESTPACKAGESUBDIRS=cg packages/win-base packages/webtbs packages/hash packages/fcl-registry
+TESTPACKAGESUBDIRS=cg packages/win-base packages/webtbs packages/hash packages/fcl-registry packages/fcl-process
 
 
 ifdef QUICKTEST
 ifdef QUICKTEST
 export QUICKTEST
 export QUICKTEST

+ 23 - 0
tests/test/packages/fcl-process/tw11570.pp

@@ -0,0 +1,23 @@
+program Project1;
+
+{$mode objfpc}{$H+}
+
+uses
+  Classes, SysUtils, Process
+  { you can add units after this };
+
+var
+  p: TProcess;
+begin
+  try
+    p := TProcess.Create(nil);
+    p.Active := true;
+  except
+    on eprocess do
+      begin
+        writeln('ok');
+        halt(0);
+      end;
+  end;
+  halt(1);
+end.