From 556aa6f2665fe00098bdc28d410f9463fc100d09 Mon Sep 17 00:00:00 2001 From: "David G. Holm" Date: Wed, 6 Oct 1999 15:30:38 +0000 Subject: [PATCH] See ChangeLog entry 19991006-11:20 EDT David G. Holm --- harbour/ChangeLog | 17 ++ harbour/config/os2/icc.cf | 4 + harbour/tests/Makefile | 320 +++++++++++++++++++------------------ harbour/tests/devtest.prg | 45 ++++++ harbour/tests/disptest.prg | 91 +++++++++++ 5 files changed, 320 insertions(+), 157 deletions(-) create mode 100644 harbour/tests/devtest.prg create mode 100644 harbour/tests/disptest.prg diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 4b9bea2dc6..3ab1fec4e3 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -1,3 +1,20 @@ +19991006-11:20 EDT David G. Holm + + * config/os2/icc.cf + + Added way to select startup model using HB_MAIN, + because ICC won't resolve main() from vm library. + + * tests/Makefile + + Added HB_MAIN=std (but only if HB_MAIN not already set). + + Added devtest.prg + + Added disptest.prg + + + tests/devtest.prg + + New module to test Clipper device compatibility. + + + tests/disptest.prg + + New module to test Clipper display compatibility. + 19991006-14:35 GMT+1 Victor Szel * source/rtl/dummy.prg source/rtl/Makefile diff --git a/harbour/config/os2/icc.cf b/harbour/config/os2/icc.cf index a739c9f2cd..14c66a2490 100644 --- a/harbour/config/os2/icc.cf +++ b/harbour/config/os2/icc.cf @@ -18,6 +18,10 @@ CFLAGS = /Gs+ /W2 /Se /Sd+ /Ti+ LD = icc LD_OUT = /Fe LDFLAGS = /C- +ifeq ($(HB_MAIN),) +else +LDFLAGS += $(TOP)$(ROOT)source/vm/$(ARCH)/main$(HB_MAIN).obj +endif ifeq ($(HB_LIB_COMPILE),) LINKLIBS = $(foreach lib, $(LIBS), $(TOP)$(ROOT)source/$(lib)/$(ARCH)/$(lib)$(LIB_EXT)) # If LIBS specifies the rdd library, add all DB drivers. diff --git a/harbour/tests/Makefile b/harbour/tests/Makefile index 937bc7a95d..e062f7ff8f 100644 --- a/harbour/tests/Makefile +++ b/harbour/tests/Makefile @@ -2,182 +2,188 @@ # $Id$ # +ifeq ($(HB_MAIN),) +HB_MAIN = std +endif + ROOT = ../ LIBS=\ - tools \ - debug \ - rtl \ - rdd \ - vm \ - rdd \ - rtl \ - pp \ - runner \ + tools \ + debug \ + rtl \ + rdd \ + vm \ + rdd \ + rtl \ + pp \ + runner \ ifeq ($(PM),) PM := $(pm) endif ifeq ($(PM),) # PM not defined = build all files PRG_SOURCES=\ - ac_test.prg \ - adirtest.prg \ - ainstest.prg \ - and_or.prg \ - array16.prg \ - arrayidx.prg \ - arrays.prg \ - arreval.prg \ - arrindex.prg \ - atest.prg \ - begin.prg \ - box.prg \ - byref.prg \ - calling.prg \ - cdow.prg \ - clasinit.prg \ - classch.prg \ - classes.prg \ - clsdata.prg \ - cmphello.prg \ - codebl.prg \ - codebloc.prg \ - comments.prg \ - copyfile.prg \ - curdirt.prg \ - cursrtst.prg \ - dates.prg \ - dates2.prg \ - dates3.prg \ - dates4.prg \ - db_brows.prg \ - debugtst.prg \ - dirtest.prg \ - docase.prg \ - dosshell.prg \ - dynobj.prg \ - dynsym.prg \ - exittest.prg \ - fib.prg \ - fileio.prg \ - filexist.prg \ - fornext.prg \ - fornext2.prg \ - fortest.prg \ - funcarr.prg \ - guess.prg \ - hardcr.prg \ - hello.prg \ - ifelse.prg \ - ifinline.prg \ - inherit.prg \ - inifiles.prg \ - initexit.prg \ - inkeytst.prg \ - inline.prg \ - instr.prg \ - iotest.prg \ - iotest2.prg \ - longdev.prg \ - longstr.prg \ - longstr2.prg \ - mankala.prg \ - mathtest.prg \ - memfile.prg \ - memvar.prg \ - menutest.prg \ - mtran.prg \ - multiarg.prg \ - nums.prg \ - objarr.prg \ - objasign.prg \ - objects.prg \ - operat.prg \ - os.prg \ - output.prg \ - overload.prg \ - parexpr.prg \ - passref.prg \ - procline.prg \ - procname.prg \ - readfile.prg \ - readhrb.prg \ - recursiv.prg \ - returns.prg \ - round.prg \ - rtfclass.prg \ - rtl_test.prg \ - say.prg \ - scroll.prg \ - seconds.prg \ - set_num.prg \ - set_test.prg \ - sound.prg \ - statinit.prg \ - statfun.prg \ - statics.prg \ - strcmp.prg \ - strdelim.prg \ - strings.prg \ - strings2.prg \ - strings3.prg \ - strip.prg \ - syserror.prg \ - t1.prg \ - test.prg \ - test_all.prg \ - testbrw.prg \ - testcgi.prg \ - testdbf.prg \ - testerro.prg \ - testfor.prg \ - testgt.prg \ - testhbf.prg \ - testhtml.prg \ - testinc.prg \ - testmem.prg \ - teststr.prg \ - testtok.prg \ - testpre.prg \ - testread.prg \ - testrdd.prg \ - testvars.prg \ - testwarn.prg \ - tstcolor.prg \ - val.prg \ - version.prg \ - while.prg \ + ac_test.prg \ + adirtest.prg \ + ainstest.prg \ + and_or.prg \ + array16.prg \ + arrayidx.prg \ + arrays.prg \ + arreval.prg \ + arrindex.prg \ + atest.prg \ + begin.prg \ + box.prg \ + byref.prg \ + calling.prg \ + cdow.prg \ + clasinit.prg \ + classch.prg \ + classes.prg \ + clsdata.prg \ + cmphello.prg \ + codebl.prg \ + codebloc.prg \ + comments.prg \ + copyfile.prg \ + curdirt.prg \ + cursrtst.prg \ + dates.prg \ + dates2.prg \ + dates3.prg \ + dates4.prg \ + db_brows.prg \ + debugtst.prg \ + devtest.prg \ + dirtest.prg \ + disptest.prg \ + docase.prg \ + dosshell.prg \ + dynobj.prg \ + dynsym.prg \ + exittest.prg \ + fib.prg \ + fileio.prg \ + filexist.prg \ + fornext.prg \ + fornext2.prg \ + fortest.prg \ + funcarr.prg \ + guess.prg \ + hardcr.prg \ + hello.prg \ + ifelse.prg \ + ifinline.prg \ + inherit.prg \ + inifiles.prg \ + initexit.prg \ + inkeytst.prg \ + inline.prg \ + instr.prg \ + iotest.prg \ + iotest2.prg \ + longdev.prg \ + longstr.prg \ + longstr2.prg \ + mankala.prg \ + mathtest.prg \ + memfile.prg \ + memvar.prg \ + menutest.prg \ + mtran.prg \ + multiarg.prg \ + nums.prg \ + objarr.prg \ + objasign.prg \ + objects.prg \ + operat.prg \ + os.prg \ + output.prg \ + overload.prg \ + parexpr.prg \ + passref.prg \ + procline.prg \ + procname.prg \ + readfile.prg \ + readhrb.prg \ + recursiv.prg \ + returns.prg \ + round.prg \ + rtfclass.prg \ + rtl_test.prg \ + say.prg \ + scroll.prg \ + seconds.prg \ + set_num.prg \ + set_test.prg \ + sound.prg \ + statinit.prg \ + statfun.prg \ + statics.prg \ + strcmp.prg \ + strdelim.prg \ + strings.prg \ + strings2.prg \ + strings3.prg \ + strip.prg \ + syserror.prg \ + t1.prg \ + test.prg \ + test_all.prg \ + testbrw.prg \ + testcgi.prg \ + testdbf.prg \ + testerro.prg \ + testfor.prg \ + testgt.prg \ + testhbf.prg \ + testhtml.prg \ + testinc.prg \ + testmem.prg \ + teststr.prg \ + testtok.prg \ + testpre.prg \ + testread.prg \ + testrdd.prg \ + testvars.prg \ + testwarn.prg \ + tstcolor.prg \ + val.prg \ + version.prg \ + while.prg \ PRG_HEADERS=\ - db_brows.ch \ - cgi.ch \ - keywords.ch \ - test.ch \ + db_brows.ch \ + cgi.ch \ + keywords.ch \ + test.ch \ BAD_PRG_SOURCES=\ - alias.prg \ - clasname.prg \ - dupvars.prg \ - extend1.prg \ - keywords.prg \ - linecont.prg \ - lnlenli1.prg \ - lnlenli2.prg \ - setkeys.prg \ - spawn.prg \ - spawn2.prg \ - statics1.prg \ - statics2.prg \ - test10.prg \ - testid.prg \ - vec1.prg \ + alias.prg \ + clasname.prg \ + dupvars.prg \ + extend1.prg \ + keywords.prg \ + linecont.prg \ + lnlenli1.prg \ + lnlenli2.prg \ + setkeys.prg \ + spawn.prg \ + spawn2.prg \ + statics1.prg \ + statics2.prg \ + test10.prg \ + testid.prg \ + vec1.prg \ C_SOURCES=\ C_HEADERS=\ BAD_C_SOURCES=\ - extend2.c \ + extend2.c \ include $(TOP)$(ROOT)config/test.cf diff --git a/harbour/tests/devtest.prg b/harbour/tests/devtest.prg new file mode 100644 index 0000000000..22a2e02e94 --- /dev/null +++ b/harbour/tests/devtest.prg @@ -0,0 +1,45 @@ +/* + * $Id$ + */ + +// Test program for DEVPOS() and DEVOUT() Clipper compatibility +// The result is either devtestc.prn or devtesth.prn, depending upon +// which compiler created the program. Both files should be 263,444 +// bytes in size and should be identical. +/* Harbour Project source code + http://www.Harbour-Project.org/ + Public domain program written by David G. Holm +*/ + +procedure main() +#ifdef __HARBOUR__ + SET PRINTER TO devtesth +#else + SET PRINTER TO devtestc +#endif + SET DEVICE TO PRINTER + DevPos( -2, 76 ) + ? Prow(), Pcol() + DevOut( "First text written!" ) + ? Prow(), Pcol() + DevOut( "Hello" ) + ? Prow(), Pcol() + DevPos( 6, 74 ) + ? Prow(), Pcol() + DevOut( "Off to the side!!" ) + ? Prow(), Pcol() + DevPos( 8, -12 ) + ? Prow(), Pcol() + DevPos( 13, -12 ) + ? Prow(), Pcol() + DevOut( "More test text!" ) + ? Prow(), Pcol() + DevOut( "Yet more text!" ) + ? Prow(), Pcol() + DevPos( 19, 85 ) + ? Prow(), Pcol() + DevPos( 500, 20 ) + ? Prow(), Pcol() + DevOut( "!" ) + ? Prow(), Pcol() +quit \ No newline at end of file diff --git a/harbour/tests/disptest.prg b/harbour/tests/disptest.prg new file mode 100644 index 0000000000..ec64b66618 --- /dev/null +++ b/harbour/tests/disptest.prg @@ -0,0 +1,91 @@ +/* + * $Id$ + */ + +// Test program for SETPOS(), DISPOUT(), ?, and ?? Clipper compatibility +// The results should be identical between Harbour with the GT API and +// Clipper. INKEY() is used to pause the display at certain points to make +// it easier to compare scrolling compatibility. A TONE() is sounded before +// each INKEY(0) call. +/* Harbour Project source code + http://www.Harbour-Project.org/ + Public domain program written by David G. Holm +*/ +procedure main() +local a,b,c,d,e,f,g,h,i,j,k,l + SetPos( -2, 76 ) + DispOut( "You won't see this!" ) + tone(440,1) + inkey(0) + a := Row() + b := Col() + ?? a, b + tone(440,1) + inkey(0) + c := Row() + d := Col() + ?? c, d + tone(440,1) + inkey(0) + e := Row() + f := Row() + ?? e, f + tone(440,1) + inkey(0) + g := Row() + h := Col() + ?? g, h + tone(440,1) + inkey(0) + i := Row() + j := Col() + ?? i, j + tone(440,1) + inkey(0) + k := Row() + l := Col() + ?? k, l + tone(440,1) + inkey(0) + CLS + ?? a,b + ?? c,d + ?? e,f + ?? g,h + ?? i,j + ?? k,l + DispOut( "Hello" ) + SetPos( 6, 74 ) + DispOut( "Partly off screen!" ) + ? Row(), Col() + SetPos( 8, -12 ) + a := Row() + b := Col() + ?? "PA" + c := Row() + d := Col() + ?? "ll on screen!" + e := Row() + f := Row() + ? a,b + ? c,d + ? e,f + SetPos( 13, -12 ) + a := Row() + b := Col() + DispOut( "All off screen!" ) + c := Row() + d := Col() + DispOut( "All on screen!" ) + e := Row() + f := Row() + ? a,b + ? c,d + ? e,f + SetPos( 19, 85 ) + ?? "All on screen??" + tone(880,1) + inkey(0) + SetPos( 50, 20 ) + ?? "On screen??" +quit \ No newline at end of file