HATE: Incorporating HATE in your own Tcl Programs
HATE is structured as a short main program that invokes a library of Tcl procedures stored in a file called hate.tcl. This decomposition is deliberate, as it is anticipated that people may wish to utilize HATE within their own Tcl programs, perhaps as an option under a menu in a graphical user interface.
To make use of HATE in your own Tcl scripts, you need only load the procedures in hate.tcl and invoke a few routines. This is perhaps best illustrated by example -- the following Tcl code is a minimal interface to the HATE routines to process the test script in file mytests.tcl:
source /usr/local/lib/hate/hate.tcl HATE_Init HATE_Args -evaluate -verbose HATE_BeginOutput HATE_RunScript mytests.tcl HATE_Report -counters HATE_EndOutputNote that this assumes that the file hate.tcl is stored in the directory /usr/local/lib/hate, which is the conventional place on a Unix system but not on other platforms.