.\" Generated by manscript from termdebug.1.txt .TH "TERMDEBUG" "1" "2013/03/03" "2.2" "termdebug" .SH NAME termdebug \- utilities for debugging interactive terminal programs. .SH DESCRIPTION \fBtermdebug\fR is a set of utilities to record and replay the input and output of terminal programs. Its main goal is to aid in developing and debugging terminal programs. Other programs such as termrec/termplay, nethack-recorder/player and script/scriptreplay only record the output. However, when debugging an interactive terminal program, the input is often as important as the output. .PP \fBtermdebug\fR consists of the following utilities: .PP .TP \fBtdrecord\fR Starts a program and records its input and output. .TP \fBtdreplay\fR Starts a program and replays the input of a recording. .TP \fBtdview\fR Shows the output of a recording. .TP \fBtdrerecord\fR Starts a program and replays the input of a recording, recording the input and output to create a new recording. .TP \fBtdcompare\fR Compares two recordings to determine if there are differences. The reported differences can be either on the exact input/output behaviour, or on the visual behaviour. .SH GRAMMAR The recordings made with the \fBtermdebug\fR utilities use a simple format. Each recording consists of a set of directives with arguments. White space is not important. The language supports line comments which start at # and run to the end of the line. The only other elements are numbers (a sequence of digits) and strings. Strings start and end with a double qoute, and use C-style escaping. The following directives are known: .PP .TP \fBenv\fR \fIname\fR \fIvalue\fR Set the value of environment variable \fIname\fR to \fIvalue\fR. \fIname\fR and \fIvalue\fR are strings. All env directives must appear before the start directive. .TP \fBwindow_size\fR \fIcolumns\fR \fIlines\fR [\fIdelay\fR [\fB>\fR \fImin_delay\fR]] Set the terminal window size to \fIcolumns\fR by lines_. May be specified both before and after the start directive. On optional \fIdelay\fR in milliseconds may be specified. Furthermore, \fImin_delay\fR may be specified to force a wait of at least \fImin_delay\fR milliseconds regardless of program options changing the key delay. .TP \fBstart\fR \fIclient\fR [\fIargument\fR+] The start directive indicates the \fIclient\fR to start. Zero or more \fIargument\fRs for the \fIclient\fR may be specified. \fIclient\fR and \fIargument\fR are strings. .TP \fBrequire_version\fR \fIversion\fR Tell the interpreter that the script langauge version must be \fIversion\fR. The current version is 1. .PP The following directives may only appear after the start directive: .PP .TP \fBexpect\fR \fIstring\fR+ Indicate what output to expect. One or more \fIstring\fRs may be specified. .TP \fBsend\fR (\fIdelay\fR \fIstring\fR [\fB>\fR \fImin_delay\fR)+ Specify one or more key \fIstring\fRs to send to the client program. \fIdelay\fR is the delay in miliseconds to wait before sending \fIstring\fR. Furthermore, \fImin_delay\fR may be specified to force a wait of at least \fImin_delay\fR milliseconds regardless of program options changing the key delay. .TP \fBexpect_exit\fR \fIstatus\fR Signal that the client should stop at this point, returning \fIstatus\fR. .TP \fBexpect_suspend\fR Indicate that the client should suspend itself at this point. .TP \fBinteract\fR Indicate the interaction with the user should be started at this point. Any directives after this point will be ignored. .SH AUTHOR G.P. Halkes .SH COPYRIGHT Copyright \(co 2010,2012 G.P. Halkes .br \fBtermdebug\fR is licensed under the GNU General Public License version 3. .br For more details on the license, see the file COPYING in the documentation directory. On Un*x systems this is usually /usr/share/doc/termdebug. .SH SEE\ ALSO \fBtdrecord\fR(1), \fBtdreplay\fR(1), \fBtdrerecord\fR(1), \fBtdview\fR(1)