ANNOUNCE: Tcl Stubs Package

From: Robert Seeger (
Date: 07/21/04

Date: 21 Jul 2004 07:52:20 -0700

I am proud to officially announce the first release of the Tcl Stubs

What is the Tcl Stubs Package?

The Stubs package is a library for enhancing the development speed and
readability of test cases (typically, for tcltest). It allows one to
temporarily redefine a command, group of commands, or part of a
command (ie, a subcommand). The actual README file is shown below,
which goes into more detail about the package.

The individuals at Sourceforge have been kind enough to host the
project, meaning it can be found at


Stubs is a package for the Tcl programming language, intended to make
tests faster and easier. By simplifying the process of temporarily
replacing the
functionality of a command, group of commands, or part of a command,
test cases
are simpler to both write and understand.

The package provides the following functionality:
- Stub out a command in several ways:
  - Replace a command with one that returns a simple value
  - Replace a command with an alias to another command
  - Replace a command with a new command definition
  - Replace a command with another, predefined, command
  - Replace a subcommand of a command with a new code block (i.e.,
clock seconds)
- Unstub a command, returning it to its original functionality
- Call the previous definition of a command from within a stub
- Define command replacements, which can later be used in the stub
- Define stub Groups with can be used to stub multiple commands at
- Load stub modules, which can define various groups and/or stubs


The Stubs package was originally written for use with the standard Tcl
tcltest. While there is no reason it should not work with other
frameworks, it has not been tested outside of tcltest.


The Stubs package was originally designed and written at AOL, in
support of unit
testing for various software projects there. While the code in this
package was
developed separately from that use at AOL, the base ideas and
are the same. As such, I extend my thanks to AOL for the ideas
contained in this
package, and for allowing me to take those ideas and publicly release
my own
implementation of them.

I would also like to thank Dossy Shiobara, who was a co-developer of
original package and was kind enough to provide many helpful ideas
about the

Relevant Pages

  • Re: Ran ccmclean on site server, what are implications???
    ... i ran the synctool command line in a cmd running under system account using ... The sync tool only has to retrieve the files from the distribution share ... only created the package folder. ... baffles me that the advanced client that resides on the sms ...
  • Re: What are the core packages for a desktops Linux desktop distribution?
    ... Your use of the term package is a bit confusing ... You'll need the mount command as well. ... As for Gnome, if you are going for minimalism, I ... wouldn't install it - you don't need it. ...
  • Re: Life on the Command Line
    ... Gutsy as the IM package or the ICQ package. ... There are a lot of games you can play in the Command Line, ... terminals in one window (like tabbing, except it can be used everywhere, ...
  • Re: now do you "link" .tcl files?
    ... I think from the position of a newbie, this is how linking in Tcl ... At the time of the call, Tcl looks up the command named "foo" using ... pkgIndex.tcl for a Tcl-only package usually contains ...
  • Re: perl menubased user interface
    ... actually use a perl package OR a hash for this, In a "perl package" ... sub map_method { ... # and they're all shell commands. ... Do whatever you want to wrap a shell command. ...