Version 0 of tcltest - How to get test name inside test command

Updated 2018-06-30 18:18:38 by krehbiel

The tcltest command is a great tool for doing regression testing however the command doesn't provide access to the test name within the body of the test command. This problem can be solved using the info frame command as shown in the example below.

package require tcltest
namespace import -force ::tcltest::*

proc test_name { } {
        set frame [dict create {*}[info frame 1]]
        return [lindex [dict get $frame cmd] 1]
}