HOW2TEST.TXT  J.R. Ferguson Pascal Library - How to Test

Feb 19, 2000


How to test the units
=====================

For nearly all units in  the  Pascal  Library  there  is  a  matching  test
program.  Its name can easily be found: for unit xxxLIB the test program is
xxxTST. So CHRLIB.PAS, for instance, can be tested with CHRTST.PAS, and  so
forth.

Some of the test programs include a file xxxTSTM.PAS or xxxTSTMn.PAS, where
n is a number (1,2,3,...). These are menu handling procedure  sources  that
can  be  generated  from  a textfile xxxTSTM[n].TXT, provided with the test
program  sources.  You  need  the  program  MNUGEN.EXE,  to  be  found   in
MNUGEN.ZIP. The syntax is

  MNUGEN xxxTSTM.TXT

If  there  is more than one menu for the test program, you may use WILD.BAT
to process them with a single command:

  WILD MNUGEN xxxTST*.TXT

You may even want to generate all test menu's at once, issuing the command

  WILD MNUGEN *.TXT

Once  the  include  files  for  the  menu's are generated, compile the test
program and execute it. Some of them can be  compiled  for  more  than  one
target environment: DOS real mode, DOS protected mode and Windows.

For most test programs,  there is a matching batch compile procedure  named
xxxTST0.bat. It will take care of creating any neccessary menus as well. So
to compile STPTST.PAS, for instance, you type the command STPTST0, and will
get STPTST.EXE, wich is a test program for the STPLIB unit.
You can even use ALLTST0.BAT to compile all test programs.
Use CLEANUP.BAT  to clean the test directory of the  test program EXE files
and other intermediate files, keeping the test program sources in tact.
The xxxTST0.BAT batch procedures use BPCS.BAT top invoke the Borland Pascal
compiler. You may have to edit BPCS.BAT to reflect your system environment.

Most test programs are menu oriented,  so you just type its name to start a
test session. This is not the case for the following test programs:
  ARGTST : Preferrably add some arguments, like in "ARGTST ONE TWO THREE".
  OPTTST : For help, type "OPTTST /?".
  SRTTST : For help, type "SRTTST /?".
           Test example: SRTTST <SRTTST.DAT
           SRTTST is a DOS text filter,  expecting redirected input "<...".
           If you omit that command argument, the input is expected to come
           from the keyboard. Type Ctrl-Z to end the test session.
  FLTTSTx: For help, type "FLTTST1 /?", "FLTTST2 /?" or "FLTTST3 /?".
           FLTTST1 is a DOS text filter, expecting redirected input "<...".
           If you omit that command argument, the input is expected to come
           from the keyboard. Type Ctrl-Z to end the test session.

There are no batch compile programs for the Delphi test programs.  You will
need the Delphi program development environment to compile and run the test
programs.
   
For the DTMLIB routines there are some  more  test  applications  that  you
might even want to use as stand-alone tools for date manipulation.
  DTMTSTV.PAS   Borland Pascal v7.0 for DOS with Borland Turbo Vision
  DTMTSTW.PAS   Borland Pascal v7.0 for Windows
  DTMTSTW.RC    - resources
  DTMTSTW.INC   - include file
  DTMDTS13.ZIP  Borland Delphi 1.0 for Windows
