From 9b9cd5b2f25b39bf366e0487b723c2fa770fcd2c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roman=20Smr=C5=BE?= Date: Thu, 8 Jan 2026 21:01:24 +0100 Subject: Test: checks for extra call stack output --- src/Output.hs | 1 + test/script/run.et | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/src/Output.hs b/src/Output.hs index ca79dab..01c0b4b 100644 --- a/src/Output.hs +++ b/src/Output.hs @@ -193,6 +193,7 @@ testOutputLines otype@(OutputMatchFail (CallStack stack)) _ msg = concat [ [ T.concat [ outTestLabel otype, " ", msg ] ] , concat $ flip map stack $ \( sline, vars ) -> T.concat [ outTestLabel otype, "-line ", textSourceLine sline ] : showVars vars + , [ T.concat [ outTestLabel otype, "-done" ] ] ] where showVars = diff --git a/test/script/run.et b/test/script/run.et index b2d3ca9..7f789ab 100644 --- a/test/script/run.et +++ b/test/script/run.et @@ -116,6 +116,9 @@ test CallStack: expect /match-fail guard failed/ expect /match-fail-line .*\/callstack.et:3:5: .*/ expect /match-fail-var x 1/ + local: + expect /(match-fail-.*)/ capture done + guard (done == "match-fail-done") local: expect /(run-.*)/ capture done guard (done == "run-failed") @@ -125,6 +128,9 @@ test CallStack: expect /match-fail expect failed/ expect /match-fail-line .*\/callstack.et:8:5: .*/ expect /match-fail-var x 2/ + local: + expect /(match-fail-.*)/ capture done + guard (done == "match-fail-done") local: expect /(run-.*)/ capture done guard (done == "run-failed") @@ -135,6 +141,9 @@ test CallStack: expect /match-fail-line .*\/callstack.et:12:5: .*/ expect /match-fail-var x 1/ expect /match-fail-line .*\/callstack.et:15:5: .*/ + local: + expect /(match-fail-.*)/ capture done + guard (done == "match-fail-done") local: expect /(run-.*)/ capture done guard (done == "run-failed") @@ -147,6 +156,9 @@ test CallStack: expect /match-fail-var y 2/ expect /match-fail-line .*\/callstack.et:23:5: .*/ expect /match-fail-var z 3/ + local: + expect /(match-fail-.*)/ capture done + guard (done == "match-fail-done") local: expect /(run-.*)/ capture done guard (done == "run-failed") @@ -157,6 +169,10 @@ test CallStack: expect /match-fail-line .*\/callstack.et:27:5: .*/ expect /match-fail-var x 1/ expect /match-fail-line .*\/callstack.et:31:5: .*/ + expect /match-fail-var p .*/ + local: + expect /(match-fail-.*)/ capture done + guard (done == "match-fail-done") local: expect /(run-.*)/ capture done guard (done == "run-failed") @@ -168,7 +184,11 @@ test CallStack: expect /match-fail-var x 3/ expect /match-fail-var y 2/ expect /match-fail-line .*\/callstack.et:41:5: .*/ + expect /match-fail-var p .*/ expect /match-fail-var z 3/ + local: + expect /(match-fail-.*)/ capture done + guard (done == "match-fail-done") local: expect /(run-.*)/ capture done guard (done == "run-failed") -- cgit v1.2.3