Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Expect with tcltest?

29 views
Skip to first unread message

whytea

unread,
May 5, 2008, 8:30:52 AM5/5/08
to
I have just read up tcltest. I'm wondering if tcltest is useful to be
used together with Expect. For example, Expect is used to remote login
and run some commands and tcltest can do the pattern matching and result
reporting. Are there any benefits in doing it this way? Or, perhaps
there is no value to use tcltest with Expect?

BTW, in tcltest, is there a way to test something you don't expect to
see. For example, you don't want to see "Fault" or "Error"?

/Why Tea

Donald G Porter

unread,
May 9, 2008, 12:54:01 PM5/9/08
to
whytea wrote:
> BTW, in tcltest, is there a way to test something you don't expect to
> see. For example, you don't want to see "Fault" or "Error"?

With the [::tcltest::customMatch] command you can register a new mode
for the -match option to the [::tcltest::test] command, to set
the result matcher to any command you like. Create a proc that does
the kind of matching you want and use it.

--
| Don Porter Mathematical and Computational Sciences Division |
| donald...@nist.gov Information Technology Laboratory |
| http://math.nist.gov/~DPorter/ NIST |
|______________________________________________________________________|

0 new messages