summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/asset/run/callstack.et7
-rw-r--r--test/script/run.et12
2 files changed, 17 insertions, 2 deletions
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