summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/include.toc16
-rw-r--r--tests/include_expected7
-rw-r--r--tests/included.toc5
-rwxr-xr-xtests/test.sh1
4 files changed, 29 insertions, 0 deletions
diff --git a/tests/include.toc b/tests/include.toc
new file mode 100644
index 0000000..dee6c16
--- /dev/null
+++ b/tests/include.toc
@@ -0,0 +1,16 @@
+#include "std/io.toc", io;
+#include "std/io.toc", foo;
+#include "std/io.toc", bar;
+#include "std/io.toc", baz;
+#include "std/io.toc";
+#include "included.toc", inc;
+
+main ::= fn() {
+ puts("hello");
+ io.puts("hello");
+ foo.puts("hello");
+ bar.puts("hello");
+ baz.puts("hello");
+ inc.puts("hello");
+ inc.foo.puts("hello");
+}
diff --git a/tests/include_expected b/tests/include_expected
new file mode 100644
index 0000000..5b04198
--- /dev/null
+++ b/tests/include_expected
@@ -0,0 +1,7 @@
+hello
+hello
+hello
+hello
+hello
+hello
+hello
diff --git a/tests/included.toc b/tests/included.toc
new file mode 100644
index 0000000..548a3e5
--- /dev/null
+++ b/tests/included.toc
@@ -0,0 +1,5 @@
+// included by include.toc
+
+#include "std/io.toc";
+#include "std/io.toc", foo;
+
diff --git a/tests/test.sh b/tests/test.sh
index bf58042..1d01f06 100755
--- a/tests/test.sh
+++ b/tests/test.sh
@@ -3,6 +3,7 @@
tests='bf
control_flow
types
+include
arrs_slices
ptr_arithmetic
defer