tags:

views:

49

answers:

1

I am relatively new to TCL / expect and mostly modifying existing code.
expect_before doesn't seem to do what I expect (which is fine) but I can't work out how to debug it. I have used -d option and am now using

exp_internal -f "argh.log" 1

to create a log file, but it isn't helping me.

expect_before -info

seems useful, but I am not able to grab / display the output (I did say I was new to TCL)

+1  A: 

Function results can be grabbed in expect by the use of set

set my_expect_before [expect_before -info -all]

will grab the current configuration.

Using exp_internal is also useful to see how expressions are evaluated, and once you understand the output - it should be obvious when your expect_before has not been set up as expected.

itj