From 401b4c233d12763853877d4c31a2cf4342ca87b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roman=20Smr=C5=BE?= Date: Tue, 6 Jan 2026 22:29:07 +0100 Subject: =?UTF-8?q?Call=20stack=20for=20the=20=E2=80=98expect=E2=80=99=20s?= =?UTF-8?q?tatement?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test/asset/run/callstack.et | 18 ++++++++++++++++++ test/script/run.et | 22 ++++++++++++++++++++++ 2 files changed, 40 insertions(+) (limited to 'test') diff --git a/test/asset/run/callstack.et b/test/asset/run/callstack.et index 9e8123b..36eb401 100644 --- a/test/asset/run/callstack.et +++ b/test/asset/run/callstack.et @@ -21,3 +21,21 @@ def gg (x): test CG: let z = 3 gg (z) + +def fe on p: + let x = 1 + expect /$x/ from p timeout 0.0 + +test BE: + spawn as p + fe on p + +def ge (x) on p: + guard (x /= 0) + let y = 2 + expect /$x $y/ from p timeout 0.0 + +test CE: + spawn as p + let z = 3 + ge (z) on p diff --git a/test/script/run.et b/test/script/run.et index dfccab5..b2d3ca9 100644 --- a/test/script/run.et +++ b/test/script/run.et @@ -151,3 +151,25 @@ test CallStack: expect /(run-.*)/ capture done guard (done == "run-failed") flush + + send "run BE" + expect /match-fail expect failed/ + expect /match-fail-line .*\/callstack.et:27:5: .*/ + expect /match-fail-var x 1/ + expect /match-fail-line .*\/callstack.et:31:5: .*/ + local: + expect /(run-.*)/ capture done + guard (done == "run-failed") + flush + + send "run CE" + expect /match-fail expect failed/ + expect /match-fail-line .*\/callstack.et:36:5: .*/ + expect /match-fail-var x 3/ + expect /match-fail-var y 2/ + expect /match-fail-line .*\/callstack.et:41:5: .*/ + expect /match-fail-var z 3/ + local: + expect /(run-.*)/ capture done + guard (done == "run-failed") + flush -- cgit v1.2.3