* moved *.pp into subdirs

* fpcmaked
This commit is contained in:
peter 1999-12-02 17:37:24 +00:00
parent c5410eee5c
commit e7bb989eab
366 changed files with 2048 additions and 551 deletions

View File

@ -1,8 +1,266 @@
#
# $Id$
# Makefile generated by fpcmake v0.99.13 on 1999-12-02 18:33
#
# make all test
# and printout errors
defaultrule: info
#####################################################################
# Autodetect OS (Linux or Dos or Windows NT)
# define inlinux when running under linux
# define inWinNT when running under WinNT
#####################################################################
# We need only / in the path
override PATH:=$(subst \,/,$(PATH))
# Search for PWD and determine also if we are under linux
PWD:=$(strip $(wildcard $(addsuffix /pwd.exe,$(subst ;, ,$(PATH)))))
ifeq ($(PWD),)
PWD:=$(strip $(wildcard $(addsuffix /pwd,$(subst :, ,$(PATH)))))
ifeq ($(PWD),)
nopwd:
@echo You need the GNU utils package to use this Makefile!
@echo Get ftp://ftp.freepascal.org/pub/fpc/dist/go32v2/utilgo32.zip
@exit
else
inlinux=1
endif
else
PWD:=$(firstword $(PWD))
endif
# Detect NT - NT sets OS to Windows_NT
ifndef inlinux
ifeq ($(OS),Windows_NT)
inWinNT=1
endif
endif
# Detect OS/2 - OS/2 has OS2_SHELL defined
ifndef inlinux
ifndef inWinNT
ifdef OS2_SHELL
inOS2=1
endif
endif
endif
# The extension of executables
ifdef inlinux
EXEEXT=
else
EXEEXT=.exe
endif
# The path which is search separated by spaces
ifdef inlinux
SEARCHPATH=$(subst :, ,$(PATH))
else
SEARCHPATH=$(subst ;, ,$(PATH))
endif
#####################################################################
# FPC version/target Detection
#####################################################################
# What compiler to use ?
ifndef FPC
ifdef inOS2
export FPC=ppos2$(EXEEXT)
else
export FPC=ppc386$(EXEEXT)
endif
endif
# Target OS
ifndef OS_TARGET
export OS_TARGET:=$(shell $(FPC) -iTO)
endif
# Source OS
ifndef OS_SOURCE
export OS_SOURCE:=$(shell $(FPC) -iSO)
endif
# Target CPU
ifndef CPU_TARGET
export CPU_TARGET:=$(shell $(FPC) -iTP)
endif
# Source CPU
ifndef CPU_SOURCE
export CPU_SOURCE:=$(shell $(FPC) -iSP)
endif
# FPC version
ifndef FPC_VERSION
export FPC_VERSION:=$(shell $(FPC) -iV)
endif
#####################################################################
# Default Settings
#####################################################################
# Release ? Then force OPT and don't use extra opts via commandline
ifndef REDIRFILE
REDIRFILE=log
endif
ifdef RELEASE
override OPT:=-Xs -OG2p3 -n
endif
# Verbose settings (warning,note,info)
ifdef VERBOSE
override OPT+=-vwni
endif
ifdef REDIR
ifndef inlinux
override FPC=redir -eo $(FPC)
endif
# set the verbosity to max
override OPT+=-va
override REDIR:= >> $(REDIRFILE)
endif
#####################################################################
# User Settings
#####################################################################
# Targets
# Clean
# Install
ZIPTARGET=install
# Defaults
# Directories
ifndef PACKAGEDIR
PACKAGEDIR=$(FPCDIR)/packages
endif
ifndef COMPONENTDIR
COMPONENTDIR=$(FPCDIR)/components
endif
# Packages
# Libraries
#####################################################################
# Default extensions
#####################################################################
# Default needed extensions (Go32v2,Linux)
LOADEREXT=.as
PPLEXT=.ppl
PPUEXT=.ppu
OEXT=.o
ASMEXT=.s
SMARTEXT=.sl
STATICLIBEXT=.a
SHAREDLIBEXT=.so
PACKAGESUFFIX=
# Go32v1
ifeq ($(OS_TARGET),go32v1)
PPUEXT=.pp1
OEXT=.o1
ASMEXT=.s1
SMARTEXT=.sl1
STATICLIBEXT=.a1
SHAREDLIBEXT=.so1
PACKAGESUFFIX=v1
endif
# Go32v2
ifeq ($(OS_TARGET),go32v2)
PACKAGESUFFIX=go32
endif
# Linux
ifeq ($(OS_TARGET),linux)
PACKAGESUFFIX=linux
endif
# Win32
ifeq ($(OS_TARGET),win32)
PPUEXT=.ppw
OEXT=.ow
ASMEXT=.sw
SMARTEXT=.slw
STATICLIBEXT=.aw
SHAREDLIBEXT=.dll
PACKAGESUFFIX=win32
endif
# OS/2
ifeq ($(OS_TARGET),os2)
PPUEXT=.ppo
ASMEXT=.so2
OEXT=.oo2
SMARTEXT=.so
STATICLIBEXT=.ao2
SHAREDLIBEXT=.dll
PACKAGESUFFIX=os2
endif
# library prefix
LIBPREFIX=lib
ifeq ($(OS_TARGET),go32v2)
LIBPREFIX=
endif
ifeq ($(OS_TARGET),go32v1)
LIBPREFIX=
endif
# determine which .pas extension is used
ifndef PASEXT
ifdef EXEOBJECTS
override TESTPAS:=$(strip $(wildcard $(addsuffix .pas,$(firstword $(EXEOBJECTS)))))
else
override TESTPAS:=$(strip $(wildcard $(addsuffix .pas,$(firstword $(UNITOBJECTS)))))
endif
ifeq ($(TESTPAS),)
PASEXT=.pp
else
PASEXT=.pas
endif
endif
#####################################################################
# Standard rules
#####################################################################
#####################################################################
# Package depends
#####################################################################
ifneq ($(wildcard $(RTLDIR)),)
ifeq ($(wildcard $(RTLDIR)/$(FPCMAKED)),)
override COMPILEPACKAGES+=rtl
rtl_package:
$(MAKE) -C $(RTLDIR) all
endif
endif
.PHONY: rtl_package
#####################################################################
# Users rules
#####################################################################
DIRS=tf ts tbs tbf test tesi to
all : info
@ -10,9 +268,7 @@ tests : clean all_compilations
cont_tests : all_compilations
ifdef DJGPP
EXEEXT=.exe
ifndef inlinux
getreturncode :
redir -ea $(FILE).log -oa $(FILE).log getret $(COMMAND)
@ -20,11 +276,11 @@ getreturncode :
else
EXEEXT=
getreturncode :
getret $(COMMAND) > $(FILE).log 2>$(FILE).log
cp retcode $(FILE).$(RESEXT)
@echo "Return code of $(FILE) is $(cat retcode)"
endif
@ -81,7 +337,7 @@ testexec:
ifdef NOREDIR
getret $(FILE)$(EXEEXT)
else
ifdef DJGPP
ifndef inlinux
redir -e $(FILE).elg -o $(FILE).elg getret $(FILE)$(EXEEXT)
else
getret $(FILE)$(EXEEXT) > $(FILE).elg 2>$(FILE).elg
@ -91,9 +347,13 @@ endif
$(MAKE) testexecsuccess 'FILE=$(FILE)' 'EXCFILE=$(FILE).exc'
else
testexec:
ifeq ($(wildcard $(FILE)$(PPUEXT)),$(FILE)$(PPUEXT))
@echo "file is a unit $(FILE)$(PPUEXT)"
else
@echo "No exefile $(FILE)$(EXEEXT)"
@echo $(FILE) >> faillist
endif
endif
test_exc :
@echo $(wildcard $(FILE).exc*)
@ -111,16 +371,6 @@ testfail:
@echo $(FILE) >> tf_fail
@echo $(FILE) >> faillist
endif
ifndef PP
PP=ppc386
else
export PP
endif
ifndef OPT
OPT=
endif
ifdef FILE
OPTFILE=$(wildcard $(FILE).opt)
@ -135,7 +385,8 @@ FILE=ts00001.pp
endif
testone :
$(MAKE) getreturncode 'COMMAND=$(PP) $(OPT) $(FILE).pp' 'RESEXT=$(RESEXT)' 'FILE=$(FILE)'
$(MAKE) getreturncode 'COMMAND=$(FPC) $(OPT) $(FILE).pp' 'RESEXT=$(RESEXT)' 'FILE=$(FILE)'
%.res : %.pp
$(MAKE) testone 'FILE=$*' 'RESEXT=res'
@ -155,30 +406,25 @@ testone :
%.eli : %.res
$(MAKE) testexec 'FILE=$*' 'NOREDIR=YES'
allts : $(patsubst %.pp,%.res,$(wildcard ts*.pp))
allts : $(patsubst %.pp,%.res,$(wildcard ts/ts*.pp))
alltbs : $(patsubst %.pp,%.res,$(wildcard tbs*.pp))
alltbs : $(patsubst %.pp,%.res,$(wildcard tbs/tbs*.pp))
tbs0to99 : $(patsubst %.pp,%.res,$(wildcard tbs00*.pp))
tbs100to199 : $(patsubst %.pp,%.res,$(wildcard tbs01*.pp))
tbs200to299 : $(patsubst %.pp,%.res,$(wildcard tbs02*.pp))
tbs300to399 : $(patsubst %.pp,%.res,$(wildcard tbs03*.pp))
tbs100to199 : $(patsubst %.pp,%.res,$(wildcard tbs/tbs01*.pp))
tbs200to299 : $(patsubst %.pp,%.res,$(wildcard tbs/tbs02*.pp))
alltest : $(patsubst %.pp,%.res,$(wildcard test*.pp))
alltest : $(patsubst %.pp,%.res,$(wildcard test/test*.pp))
alltbug : $(patsubst %.pp,%.res,$(wildcard tbug*.pp))
alltesi : $(patsubst %.pp,%.res,$(wildcard tesi/tesi*.pp))
alltbuf : $(patsubst %.pp,%.ref,$(wildcard tbuf*.pp))
alltis : $(patsubst %.pp,%.res,$(wildcard tis/tis*.pp))
alltesi : $(patsubst %.pp,%.res,$(wildcard tesi*.pp))
alltf : $(patsubst %.pp,%.ref,$(wildcard tf/tf*.pp))
alltis : $(patsubst %.pp,%.res,$(wildcard tis*.pp))
alltbf : $(patsubst %.pp,%.ref,$(wildcard tbf/tbf*.pp))
alltf : $(patsubst %.pp,%.ref,$(wildcard tf*.pp))
alltbf : $(patsubst %.pp,%.ref,$(wildcard tbf*.pp))
allto : $(patsubst %.pp,%.res,$(wildcard to*.pp))
allto : $(patsubst %.pp,%.res,$(wildcard to/to*.pp))
ifndef TS_FAIL_LIST
ifeq ($(wildcard ts_fail*),ts_fail)
@ -202,111 +448,51 @@ clean_fail :
again : clean_fail $(addsuffix .res,$(TS_FAIL_LIST)) $(addsuffix .ref,$(TF_FAIL_LIST))
grep fails log
all_compilations : allts alltbs alltf alltbf alltbug alltbuf allto alltest alltesi alltis
all_compilations : allts alltbs alltf alltbf allto alltest alltesi alltis
grep fails log
allexec : alltsexec alltbsexec alltbugexec alltestexec
allexec : alltsexec alltbsexec alltestexec
grep "fails exec" log
alltestexec: $(patsubst %.pp,%.elg,$(wildcard test*.pp))
alltestexec: $(patsubst %.pp,%.elg,$(wildcard test/test*.pp))
# these test are interactive
# no redirection !!!
alltesiexec: $(patsubst %.pp,%.eli,$(wildcard test*.pp))
alltesiexec: $(patsubst %.pp,%.eli,$(wildcard tesi/tesi*.pp))
alltsexec: $(patsubst %.pp,%.elg,$(wildcard ts*.pp))
alltsexec: $(patsubst %.pp,%.elg,$(wildcard ts/ts*.pp))
alltbugexec : $(patsubst %.pp,%.elg,$(wilcard tbug*.pp))
alltbsexec: $(patsubst %.pp,%.elg,$(wildcard tbs/tbs*.pp))
alltbsexec: $(patsubst %.pp,%.elg,$(wildcard tbs*.pp))
tbsexec0to99 : $(patsubst %.pp,%.elg,$(wildcard tbs/tbs00*.pp))
tbsexec100to199 : $(patsubst %.pp,%.elg,$(wildcard tbs/tbs01*.pp))
tbsexec200to299 : $(patsubst %.pp,%.elg,$(wildcard tbs/tbs02*.pp))
tbsexec0to99 : $(patsubst %.pp,%.elg,$(wildcard tbs00*.pp))
tbsexec100to199 : $(patsubst %.pp,%.elg,$(wildcard tbs01*.pp))
tbsexec200to299 : $(patsubst %.pp,%.elg,$(wildcard tbs02*.pp))
tbsexec300to399 : $(patsubst %.pp,%.elg,$(wildcard tbs03*.pp))
alltisexec: $(patsubst %.pp,%.eli,$(wildcard tis/tis*.pp))
alltisexec: $(patsubst %.pp,%.eli,$(wildcard tis*.pp))
clean :
-rm -f *.re* *.o *.ppu *.log *.elg *.exc t*.exe log faillist ts_fail tf_fail
-rm -f ppas.sh ppas.bat retcode
ifndef DJGPP
-rm -f $(patsubst %.pp,%,$(wildcard *.pp))
clean:
-rm -f $(addsuffix /*.re*,$(DIRS))
-rm -f $(addsuffix /*$(PPUEXT),$(DIRS))
-rm -f $(addsuffix /*$(OEXT),$(DIRS))
-rm -f $(addsuffix /*.log,$(DIRS))
-rm -f $(addsuffix /*.elg,$(DIRS))
-rm -f $(addsuffix /*.exc,$(DIRS))
ifdef inlinux
-rm -f $(patsubst %.pp,%$(EXEEXT),$(wildcard $(addsuffix /t*.pp,$(DIRS))))
else
-rm -f $(addsuffix /*$(EXEEXT),$(DIRS))
endif
-rm -f log faillist ts_fail tf_fail
-rm -f fpcmaked ppas.sh ppas.bat retcode
info :
@echo This Makefile allows to test the compiler
@echo compilation of 'ts*.pp' should succeed
@echo compilation of 'tf*.pp' should fail
@echo compilation of 'test*.pp' should succeed
@echo 'tbs*.pp' are files from bugs directory that should compile and run
@echo 'tbf*.pp' are files from bugs directory that should not compile
@echo 'tbug*.pp' are files from web bug repository that should compile and run
@echo 'tbuf*.pp' are files from web bug repository that should not compile
@echo 'to*.pp' files should also compile
@echo simply run \'make tests\' to test all compilation
@echo run \'make allexec\' to test also if the executables
@echo created behave like the should
@echo run \'make tesiexec\' to test executables
@echo that require interactive mode
#
# $Log$
# Revision 1.8 1999-12-02 13:37:37 pierre
# + latest bugs converted
#
# Revision 1.7 1999/12/02 00:12:31 pierre
# + splitted targets for Win95 selector bug
#
# Revision 1.6 1999/10/13 12:42:09 pierre
# * small fixes for win32
#
# Revision 1.5 1999/09/19 11:48:18 peter
# * remove ppas and retcode
#
# Revision 1.4 1999/09/19 11:23:06 peter
# * clean also the executables under linux
#
# Revision 1.3 1999/06/01 13:27:27 peter
# * updates for linux
#
# Revision 1.2 1999/06/01 00:06:14 peter
# * linux fixes
#
# Revision 1.1 1999/01/25 20:23:04 peter
# * linux updates
#
# Revision 1.12 1999/01/19 18:01:43 pierre
# local change removed
#
# Revision 1.11 1999/01/19 17:34:01 pierre
# several modifications
#
# Revision 1.10 1999/01/15 17:41:58 pierre
# + new bugs converted
#
# Revision 1.9 1998/11/10 11:13:07 pierre
# * more tests
#
# Revision 1.8 1998/10/28 09:52:26 pierre
# * see readme.txt
#
# Revision 1.7 1998/10/22 16:41:11 pierre
# * added two small tests
# iocheck inside iocheck
# enums inside objects
#
# Revision 1.6 1998/10/22 14:35:40 pierre
# + added allexec tests if executables compiled
# don't return with an error code
# * some changes in test files for dos
#
# Revision 1.5 1998/10/21 16:24:16 pierre
# + tests to check if filename exists
#
# Revision 1.4 1998/10/21 12:14:30 pierre
# * stupid error removing getret.exe each time
#
# Revision 1.3 1998/10/21 12:12:09 pierre
# Log inserted
#

248
tests/Makefile.fpc Normal file
View File

@ -0,0 +1,248 @@
#
# Makefile.fpc for Free Pascal Tests directory
#
[defaults]
defaultrule=info
[sections]
none=1
exts=1
[rules]
DIRS=tf ts tbs tbf test tesi to
all : info
tests : clean all_compilations
cont_tests : all_compilations
ifndef inlinux
getreturncode :
redir -ea $(FILE).log -oa $(FILE).log getret $(COMMAND)
cp retcode $(FILE).$(RESEXT)
else
getreturncode :
getret $(COMMAND) > $(FILE).log 2>$(FILE).log
cp retcode $(FILE).$(RESEXT)
@echo "Return code of $(FILE) is $(cat retcode)"
endif
# retcode should be between 0 and 255
# 256 is for halt
# 512+doserror if doserror<>0
# 1024 RESFILE does not exist
# 2048 RESFILE is not set
ifndef RESFILE
RETVAL=2048
else
ifeq ($(wildcard $(RESFILE)*),$(RESFILE))
RETVAL=$(shell cat $(RESFILE))
else
RETVAL=1024
endif
endif
ifeq ($(RETVAL),0)
testsuccess:
@echo "Test for $(FILE) success (compiles)"
@echo "Test for $(FILE) success (compiles)" >>log
else
testsuccess:
@echo "Test for $(FILE) fails (does not compile) error $(RETVAL)"
@echo "Test for $(FILE) fails (does not compile) error $(RETVAL)" >>log
@echo $(FILE) >> ts_fail
@echo $(FILE) >> faillist
endif
ifdef EXCFILE
ifeq ($(wildcard $(EXCFILE)*),$(EXCFILE))
EXERETVAL:=$(shell cat $(EXCFILE))
else
EXERETVAL=$(EXCFILE) does not exist
endif
else
EXERETVAL=No EXCFILE variable defined
endif
ifeq ($(EXERETVAL),0)
testexecsuccess:
@echo "Test for exec $(FILE) success (runs without error)"
@echo "Test for $(FILE) success (runs without error)" >>log
else
testexecsuccess:
@echo "Test for exec $(FILE) fails exec error $(EXERETVAL)"
@echo "Test for exec $(FILE) fails exec error $(EXERETVAL)" >>log
endif
ifeq ($(wildcard $(FILE)$(EXEEXT)),$(FILE)$(EXEEXT))
testexec:
@echo "Testing $(FILE)$(EXEEXT)"
ifdef NOREDIR
getret $(FILE)$(EXEEXT)
else
ifndef inlinux
redir -e $(FILE).elg -o $(FILE).elg getret $(FILE)$(EXEEXT)
else
getret $(FILE)$(EXEEXT) > $(FILE).elg 2>$(FILE).elg
endif
endif
cp -f retcode $(FILE).exc
$(MAKE) testexecsuccess 'FILE=$(FILE)' 'EXCFILE=$(FILE).exc'
else
testexec:
ifeq ($(wildcard $(FILE)$(PPUEXT)),$(FILE)$(PPUEXT))
@echo "file is a unit $(FILE)$(PPUEXT)"
else
@echo "No exefile $(FILE)$(EXEEXT)"
@echo $(FILE) >> faillist
endif
endif
test_exc :
@echo $(wildcard $(FILE).exc*)
@echo xx$(wildcard $(EXCFILE)*)xx xx$(EXCFILE)xx
cat $(FILE).exc
ifneq ($(RETVAL),0)
testfail:
@echo "Test for $(FILE) success (does not compile) error $(RETVAL)"
@echo "Test for $(FILE) success (does not compile) error $(RETVAL)" >> log
else
testfail:
@echo "Test for $(FILE) fails (does compile and should not)"
@echo "Test for $(FILE) fails (does compile and should not)" >> log
@echo $(FILE) >> tf_fail
@echo $(FILE) >> faillist
endif
ifdef FILE
OPTFILE=$(wildcard $(FILE).opt)
endif
ifdef OPTFILE
override OPT+=$(OPTFILE)
endif
ifndef FILE
FILE=ts00001.pp
endif
testone :
$(MAKE) getreturncode 'COMMAND=$(FPC) $(OPT) $(FILE).pp' 'RESEXT=$(RESEXT)' 'FILE=$(FILE)'
%.res : %.pp
$(MAKE) testone 'FILE=$*' 'RESEXT=res'
$(MAKE) testsuccess 'FILE=$*' 'RESFILE=$*.res'
%.ref : %.pp
$(MAKE) testone 'FILE=$*' 'RESEXT=ref'
$(MAKE) testfail 'FILE=$*' 'RESFILE=$*.ref'
# exec log files
# creates two files
# *.elg log file
# *.exc exicode of program
%.elg : %.res
$(MAKE) testexec 'FILE=$*'
%.eli : %.res
$(MAKE) testexec 'FILE=$*' 'NOREDIR=YES'
allts : $(patsubst %.pp,%.res,$(wildcard ts/ts*.pp))
alltbs : $(patsubst %.pp,%.res,$(wildcard tbs/tbs*.pp))
tbs0to99 : $(patsubst %.pp,%.res,$(wildcard tbs00*.pp))
tbs100to199 : $(patsubst %.pp,%.res,$(wildcard tbs/tbs01*.pp))
tbs200to299 : $(patsubst %.pp,%.res,$(wildcard tbs/tbs02*.pp))
alltest : $(patsubst %.pp,%.res,$(wildcard test/test*.pp))
alltesi : $(patsubst %.pp,%.res,$(wildcard tesi/tesi*.pp))
alltis : $(patsubst %.pp,%.res,$(wildcard tis/tis*.pp))
alltf : $(patsubst %.pp,%.ref,$(wildcard tf/tf*.pp))
alltbf : $(patsubst %.pp,%.ref,$(wildcard tbf/tbf*.pp))
allto : $(patsubst %.pp,%.res,$(wildcard to/to*.pp))
ifndef TS_FAIL_LIST
ifeq ($(wildcard ts_fail*),ts_fail)
TS_FAIL_LIST=$(shell cat ts_fail)
export TS_FAIL_LIST
endif
endif
ifndef TF_FAIL_LIST
ifeq ($(wildcard tf_fail*),tf_fail)
TF_FAIL_LIST=$(shell cat tf_fail)
export TF_FAIL_LIST
endif
endif
clean_fail :
-rm -f $(addsuffix .res,$(TS_FAIL_LIST))
-rm -f $(addsuffix .ref,$(TF_FAIL_LIST))
-rm log
again : clean_fail $(addsuffix .res,$(TS_FAIL_LIST)) $(addsuffix .ref,$(TF_FAIL_LIST))
grep fails log
all_compilations : allts alltbs alltf alltbf allto alltest alltesi alltis
grep fails log
allexec : alltsexec alltbsexec alltestexec
grep "fails exec" log
alltestexec: $(patsubst %.pp,%.elg,$(wildcard test/test*.pp))
# these test are interactive
# no redirection !!!
alltesiexec: $(patsubst %.pp,%.eli,$(wildcard tesi/tesi*.pp))
alltsexec: $(patsubst %.pp,%.elg,$(wildcard ts/ts*.pp))
alltbsexec: $(patsubst %.pp,%.elg,$(wildcard tbs/tbs*.pp))
tbsexec0to99 : $(patsubst %.pp,%.elg,$(wildcard tbs/tbs00*.pp))
tbsexec100to199 : $(patsubst %.pp,%.elg,$(wildcard tbs/tbs01*.pp))
tbsexec200to299 : $(patsubst %.pp,%.elg,$(wildcard tbs/tbs02*.pp))
alltisexec: $(patsubst %.pp,%.eli,$(wildcard tis/tis*.pp))
clean:
-rm -f $(addsuffix /*.re*,$(DIRS))
-rm -f $(addsuffix /*$(PPUEXT),$(DIRS))
-rm -f $(addsuffix /*$(OEXT),$(DIRS))
-rm -f $(addsuffix /*.log,$(DIRS))
-rm -f $(addsuffix /*.elg,$(DIRS))
-rm -f $(addsuffix /*.exc,$(DIRS))
ifdef inlinux
-rm -f $(patsubst %.pp,%$(EXEEXT),$(wildcard $(addsuffix /t*.pp,$(DIRS))))
else
-rm -f $(addsuffix /*$(EXEEXT),$(DIRS))
endif
-rm -f log faillist ts_fail tf_fail
-rm -f fpcmaked ppas.sh ppas.bat retcode
info :
@echo This Makefile allows to test the compiler
@echo compilation of 'ts*.pp' should succeed
@echo compilation of 'tf*.pp' should fail
@echo compilation of 'test*.pp' should succeed
@echo 'to*.pp' files should also compile
@echo simply run \'make tests\' to test all compilation
@echo run \'make allexec\' to test also if the executables
@echo created behave like the should
@echo run \'make tesiexec\' to test executables
@echo that require interactive mode

View File

@ -6,7 +6,7 @@ var
P: Pointer;
begin
{ must fail on compilation because
{ must fail on compilation because
TA has no VMT }
P := pointer(TypeOf(TA));
end.

9
tests/tbf/tbf0036.pp Normal file
View File

@ -0,0 +1,9 @@
program bug0036;
{Discovered by Daniel Mantione.}
var a:array[0..31] of char;
begin
a:=' '; {Incorrect Pascal statement, but why a protection error?}
end.

View File

@ -1,14 +1,14 @@
Program Test;
{ No errors -- problems is due to the fact that the rules for type
compatibility (p.47 language guide) -- are not respected, in other words
{ No errors -- problems is due to the fact that the rules for type
compatibility (p.47 language guide) -- are not respected, in other words
in case statements there is no type checking whatsoever in fpc!!
I think that these are separate cases:
1st case) s32bit,u32bit,u8bit,s8bit,s16bit,u16bit
2nd case) uchar
3rd case) bool8bit
These are not /should not be compatible with each other in a case
statement imho - CEC
These are not /should not be compatible with each other in a case
statement imho - CEC
}
var

View File

@ -6,7 +6,7 @@ var
y: integer;
type
zz: shortint = 255;
zz: shortint = 255;
Begin
y:=64000;
z:=32767;

View File

@ -9,7 +9,7 @@ type
end;
t2=object(t)
procedure p1(p : string);
procedure p1(p : string);
end;
procedure t2.p1(p : string);

View File

@ -6,7 +6,7 @@ Interface
Implementation
Procedure MyProc(Y: Integer);
Begin
end;

View File

@ -1,5 +1,5 @@
uses
dos,
;
begin
uses
dos,
;
begin
end.

View File

@ -1,7 +1,7 @@
type tr = record
l1, l2: longint
end;
var r: tr;
begin

View File

@ -1,5 +1,5 @@
{ this is not a real bug but rather a feature :
assembler function are only accepted for
assembler function are only accepted for
simple return values
i.e. either in register or FPU (PM) }
@ -7,9 +7,9 @@
function asmstr:string;assembler;
asm
movl __RESULT,%edi
movl $0x4101,%al
stosw
movl __RESULT,%edi
movl $0x4101,%al
stosw
end;
begin

View File

@ -4,8 +4,8 @@ type t1r = record
t2r = record
l1, l2: Array[1..4] Of t1r;
end;
Var r: t2r;
begin

View File

@ -1,6 +1,6 @@
type
punknown=^unknown;
t=object
procedure p(i:unknown);
end;

View File

@ -2,10 +2,10 @@ type
rec=record
a : longint;
end;
var
r1 : rec absolute $40:$49;
begin
with r1 do
a:=1;
end.
end.

View File

@ -4,6 +4,6 @@
line:array [1..endline^] of ^char;
begin
new (endline);
endline^:=5;
endline^:=5;
endline^:=10;
end.

View File

@ -2,9 +2,9 @@
{$undef dummy}
{$ifdef DUMMY}
(* <= this should not be considered as a
(* <= this should not be considered as a
higher comment level !!
test
{$endif dummy}

View File

@ -8,7 +8,7 @@ type
procedure ss;
begin
end;
var
p : pointer;
pr : preal;
@ -23,4 +23,4 @@ var
ps^:='test3';
Writeln('r=',r,' s=',s);
end.

View File

@ -1,5 +1,5 @@
PROGRAM t9;
PROCEDURE Eeep;
VAR
X: BYTE;
@ -14,7 +14,7 @@ END;
BEGIN
SubProc;
END;
BEGIN
Eeep;
END.

View File

@ -1,9 +0,0 @@
program bug0036;
{Discovered by Daniel Mantione.}
var a:array[0..31] of char;
begin
a:=' '; {Incorrect Pascal statement, but why a protection error?}
end.

View File

@ -5,5 +5,5 @@ begin
writeln(teststr);
teststr := 'gaga';
writeln(teststr);
if teststr<>'gaga' then halt(1);
if teststr<>'gaga' then halt(1);
end.

View File

@ -6,19 +6,19 @@ unit tbs0002;
{$message starting hexstr}
function hexstr(val : longint;cnt : byte) : string;
const
const
hexval : string[16]=('0123456789ABCDEF');
var
var
s : string;
l2,i : integer;
l1 : longInt;
begin
s[0]:=char(cnt);
l1:=longint($f) shl (4*(cnt-1));
for i:=1 to cnt do
for i:=1 to cnt do
begin
l2:=(val and l1) shr (4*(cnt-i));
l1:=l1 shr 4;

View File

@ -7,7 +7,7 @@ begin
writeln('Hello');
continue;
writeln('ohh');
Halt(1);
Halt(1);
end;
end.

View File

@ -1,4 +1,4 @@
uses
uses
erroru;
begin

View File

@ -10,7 +10,7 @@ begin
begin
inc(test);
writeln(count,'. loop');
if test>127 then
if test>127 then
Error;
end;
end.

View File

@ -7,7 +7,7 @@ begin
if byte(a>b)=byte(a<b) then
begin
writeln('Ohhhh');
Halt(1);
Halt(1);
end;
end.

View File

@ -1,7 +1,7 @@
program test;
type
realgr= array [1..1000] of double;
var
type
realgr= array [1..1000] of double;
var
sx :realgr;
i :integer;
stemp :double;

View File

@ -26,11 +26,11 @@ const
if not endofparas then
nextopt;
end;
begin
getparastring;
end;
end;
begin
init;
if nextoptpass<>1 then Halt(1);

View File

@ -9,5 +9,5 @@ var
begin
new(pb);
pb^:=10;
end.
end.

View File

@ -4,12 +4,12 @@ program bug0035;
{Discovered by Daniel Mantione.}
label hallo;
label hallo;
begin
writeln('Hello');
begin
hallo: {Error message: Incorrect expression.}
hallo: {Error message: Incorrect expression.}
end;
writeln('Hello again');
end.

32
tests/tbs/tbs0043.pp Normal file
View File

@ -0,0 +1,32 @@
{ THE OUTPUT is incorrect but the }
{ parsing is correct. }
{ under nasm output only. }
{ works correctly under tasm/gas }
{ other problems occur with other }
{ things in math.inc }
{ pp -TDOS -Ratt -Anasm bug0043.pp }
procedure frac;
begin
asm
subl $16,%esp
fnstcw -4(%ebp)
fwait { unknown instruction }
movw -4(%ebp),%cx
orw $0x0c3f,%cx
movw %cx,-8(%ebp)
fldcw -8(%ebp)
fwait { unknown instruction }
fldl 8(%ebp)
frndint
fsubl 8(%ebp)
fabsl
fclex
fldcw -4(%ebp)
leave
ret $8
end ['ECX'];
end;
Begin
end.

View File

@ -1,7 +1,7 @@
{ Problem with nested comments -- as you can probably see }
{ Problem with nested comments -- as you can probably see }
{ but it does give out kind of a funny error output :) }
{$UNDEF VP}
{$IFDEF Windows} ssss {$ENDIF} {No Syntax Error}

View File

@ -5,7 +5,7 @@ TYPE
constructor init;
destructor done; virtual;
private
procedure mytest;virtual; { syntax error --> should give only a
procedure mytest;virtual; { syntax error --> should give only a
warning ? }
end;
@ -23,4 +23,4 @@ warning ? }
Begin
end.

Some files were not shown because too many files have changed in this diff Show More