summaryrefslogtreecommitdiff
path: root/test/script
diff options
context:
space:
mode:
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/