That's cruel, weaknessforcats.
The place to start is with the tcl package tcltest, which comes with the standard distribution.
This is a very easy to use, powerful and flexible automatic test package for programs with a command line interface. I use it all for my regression testing. It is so useful that, even if your program is naturally a GUI, it is wo=rthwhile adding a command line interface.
here is the first page of the manual:
The tcltest package provides several utility commands useful in the construction of test suites for code instrumented to be run by evaluation of Tcl commands. Notably the built-in commands of the Tcl library itself are tested by a test suite using the tcltest package.
All the commands provided by the tcltest package are defined in and exported from the ::tcltest namespace, as indicated in the SYNOPSIS above. In the following sections, all commands will be described by their simple names, in the interest of brevity.
The central command of tcltest is [test] that defines and runs a test. Testing with [test] involves evaluation of a Tcl script and comparing the result to an expected result, as configured and controlled by a number of options. Several other commands provided by tcltest govern the configuration of [test] and the collection of many [test] commands into test suites.
See CREATING TEST SUITES WITH TCLTEST below for an extended example of how to use the commands of tcltest to produce test suites for your Tcl-enabled code.