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)
Function results can be grabbed in expect by the use of
setwill grab the current configuration.
Using
exp_internalis 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.