has this type of analysis ever been done on the tcl and tk source distributions, to determine how much of the code is being tested by the test suites?
KBK - In what sense do you mean that question? If you're asking whether coverage analysis is available for Tcl scripts, the answer is yes: Tcl Dev Kit, among others, offers it. If you're asking whether coverage analysis has been done on Tcl/Tk's own source code, I'm not sure about the answer. The maintainers don't do it routinely, as far as I know. I tried running PureCoverage on Tcl/Tk with the test suite a few years ago, and the coverage was quite good.Coverage analysis is only a guide. It's not wise to obsess about it as Dilbert's boss sometimes does. Insisting upon 100% test coverage is contrary to "defensive programming", where it's common to put in code to report, if not handle, "impossible" cases.
MAKR - This topic catched my eye at least two time in the last few months on comp.lang.tcl. So from the most recent thread I collected the following links:
- Uwe Klein wrote that with some little effort BLT's bltdebug or Tclx' cmdtrace could be used, his mail at Google 
- Arjen Markus did a simple coverage analyser, which can be found here 
- Last but not least Nagelfar was mentioned by its author Peter Spjuth to be able to do the analysis