From 89ed9a3a6c0ada2b1c252a5e24283b84eb0fa4c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roman=20Smr=C5=BE?= Date: Mon, 15 Sep 2025 21:10:39 +0200 Subject: =?UTF-8?q?Add=20timeout=20argument=20for=20the=20=E2=80=98expect?= =?UTF-8?q?=E2=80=99=20command?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Changelog: Added `timeout` argument for the `expect` command --- README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'README.md') diff --git a/README.md b/README.md index 4beb96a..be41714 100644 --- a/README.md +++ b/README.md @@ -261,7 +261,7 @@ send to Send line with `` to the standard input of ``. ``` -expect from [capture [, ... ]] +expect from [timeout ] [capture [, ... ]] ``` Check whether `` produces line matching `` on standard output, and if this does not happen within current timeout, the test fails. Output lines produced before starting this command and not matched by some previous `expect` are accepted as well. @@ -274,6 +274,9 @@ The regular expression can contain capture groups – parts enclosed in parenthe In that case the expect command has to have the `capture` clause with matching number of variable names. Results of the captures are then assigned to the newly created variables as strings. +If the `timeout` clause is used, the current timeout value is multiplied by the given `` for this `expect` call. +Timeout of zero can be used to expect a matching output line to have been already produced in the past. + ``` flush [from ] [matching ] ``` -- cgit v1.2.3