Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我对 TCL/expect 比较陌生,主要是修改现有代码。 expect_before似乎没有达到我的预期(这很好),但我不知道如何调试它。我已经使用-d了选项,现在正在使用
expect_before
-d
exp_internal -f "argh.log" 1
创建一个日志文件,但它对我没有帮助。
expect_before -info
似乎很有用,但我无法获取/显示输出(我确实说过我是 TCL 新手)
函数结果可以通过使用set
set
set my_expect_before [expect_before -info -all]
将获取当前配置。
Usingexp_internal对于查看表达式的评估方式也很有用,一旦你理解了输出 - 当你的 expect_before 没有按预期设置时应该很明显。
exp_internal