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 --- test/asset/run/callstack.et | 7 ++++++- test/script/run.et | 12 +++++++++++- 2 files changed, 17 insertions(+), 2 deletions(-) (limited to 'test') diff --git a/test/asset/run/callstack.et b/test/asset/run/callstack.et index 954b9ad..f500fb6 100644 --- a/test/asset/run/callstack.et +++ b/test/asset/run/callstack.et @@ -1,3 +1,8 @@ -test A: +test AG: let x = 1 guard (x == 0) + +test AE: + spawn as p + let x = 2 + expect /$x/ from p timeout 0.0 diff --git a/test/script/run.et b/test/script/run.et index dc2b812..f7e4f69 100644 --- a/test/script/run.et +++ b/test/script/run.et @@ -111,10 +111,20 @@ test CallStack: send "load ${scripts.path}/callstack.et" expect /load-done/ - send "run A" + send "run AG" expect /match-fail guard failed/ expect /match-fail-line .*\/callstack.et:3:5: .*/ expect /match-fail-var x 1/ local: expect /(run-.*)/ capture done guard (done == "run-failed") + flush + + send "run AE" + expect /match-fail expect failed/ + expect /match-fail-line .*\/callstack.et:8:5: .*/ + expect /match-fail-var x 2/ + local: + expect /(run-.*)/ capture done + guard (done == "run-failed") + flush -- cgit v1.2.3