summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoman Smrž <roman.smrz@seznam.cz>2025-05-09 15:14:33 +0200
committerRoman Smrž <roman.smrz@seznam.cz>2025-05-09 21:16:50 +0200
commit113afd3170557d5eeeefb428c5b6ff22450845ea (patch)
tree3b13c1db29071d55c08d72c1c1a6d413fa7602a1
parent31608670fe91a11b5a51b7a0b627ba4ade56eaa1 (diff)
Initial test scripts and configuration
-rw-r--r--erebos-tester.yaml1
-rw-r--r--test/script/expansion.et15
-rw-r--r--test/script/parser.et7
3 files changed, 23 insertions, 0 deletions
diff --git a/erebos-tester.yaml b/erebos-tester.yaml
new file mode 100644
index 0000000..2c75d7c
--- /dev/null
+++ b/erebos-tester.yaml
@@ -0,0 +1 @@
+tests: test/script/**/*.et
diff --git a/test/script/expansion.et b/test/script/expansion.et
new file mode 100644
index 0000000..86a81dc
--- /dev/null
+++ b/test/script/expansion.et
@@ -0,0 +1,15 @@
+module expansion
+
+asset expansion:
+ path: ../asset/expansion.et
+
+test VariableExpansion:
+ spawn as p
+ with p:
+ send "load ${expansion.path}"
+ expect /load-done/
+ send "run VariableExpansion"
+ for str in [ "1", "1.3", "abc", "abc" ]:
+ expect /child-stdout p $str/
+ expect /match p $str/
+ expect /run-done/
diff --git a/test/script/parser.et b/test/script/parser.et
new file mode 100644
index 0000000..ee99989
--- /dev/null
+++ b/test/script/parser.et
@@ -0,0 +1,7 @@
+module parser
+
+test ModuleNotFound:
+ spawn as p
+ with p:
+ send "load non-existing-file.et"
+ expect /load-failed file-not-found .*/