summaryrefslogtreecommitdiff
path: root/test/script
diff options
context:
space:
mode:
authorRoman Smrž <roman.smrz@seznam.cz>2025-05-10 20:56:07 +0200
committerRoman Smrž <roman.smrz@seznam.cz>2025-05-12 19:30:42 +0200
commit9f488411284608260cf5b449f2bcc87d35d0a18d (patch)
tree9861d8c485c8231208d486c7c45a9be9aebd0b82 /test/script
parent113afd3170557d5eeeefb428c5b6ff22450845ea (diff)
Fix parser indentation check after ‘export’
Diffstat (limited to 'test/script')
-rw-r--r--test/script/definition.et18
-rw-r--r--test/script/parser.et8
2 files changed, 25 insertions, 1 deletions
diff --git a/test/script/definition.et b/test/script/definition.et
new file mode 100644
index 0000000..d2da737
--- /dev/null
+++ b/test/script/definition.et
@@ -0,0 +1,18 @@
+module definition
+
+asset scripts:
+ path: ../asset/definition
+
+test Definition:
+ spawn as p
+ with p:
+ send "load ${scripts.path}/basic.et"
+ expect /load-done/
+
+ send "run Test"
+ expect /child-stdout p 4/
+ expect /match p 4/
+ expect /child-stdout p 11/
+ expect /match p 11/
+ expect /(.*)/ capture done
+ guard (done == "run-done")
diff --git a/test/script/parser.et b/test/script/parser.et
index ee99989..554e345 100644
--- a/test/script/parser.et
+++ b/test/script/parser.et
@@ -1,7 +1,13 @@
module parser
-test ModuleNotFound:
+asset scripts:
+ path: ../asset/parser
+
+test Parser:
spawn as p
with p:
send "load non-existing-file.et"
expect /load-failed file-not-found .*/
+
+ send "load ${scripts.path}/indent.et"
+ expect /load-done/