Add timeout feature to expect()

This commit is contained in:
Martin Lund 2024-04-13 15:30:14 +02:00
parent 3ad090caf7
commit 51300cc4f0
6 changed files with 60 additions and 34 deletions

View file

@ -379,8 +379,10 @@ In addition to the Lua API tio makes the following functions available:
.TP 6n
.IP "\fBexpect(string)"
Expect string - waits for string to match before continueing. Supports regular expressions. Special characters must be escaped with '\\\\'.
.IP "\fBexpect(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.
.IP "\fBsend(string)"
Send string.
.IP "\fBmodem_send(file, protocol)"