mirror of
https://github.com/tio/tio.git
synced 2026-05-01 14:57:59 +02:00
Add timeout feature to expect()
This commit is contained in:
parent
3ad090caf7
commit
51300cc4f0
6 changed files with 60 additions and 34 deletions
|
|
@ -222,11 +222,13 @@ Tio suppots Lua scripting to easily automate interaction with the tty device.
|
|||
In addition to the Lua API tio makes the following functions available:
|
||||
|
||||
```
|
||||
expect(string)
|
||||
Expect string - waits for string to match before continueing.
|
||||
expect(string, timeout)
|
||||
Expect string - waits for string to match or timeout before continueing.
|
||||
|
||||
Supports regular expressions. Special characters must be escaped with '\\'.
|
||||
|
||||
Timeout is in milliseconds, defaults to 0 meaning it will wait forever.
|
||||
|
||||
send(string)
|
||||
Send string.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue