about summary refs log tree commit diff
path: root/boot/tests
diff options
context:
space:
mode:
authorMel <mel@rnrd.eu>2025-12-29 00:58:21 +0100
committerMel <mel@rnrd.eu>2025-12-29 00:58:21 +0100
commit30b04e4b2a90981570ae04095aeccd746ccdea6a (patch)
tree49be07d48bd74ccf5534f05c9919a512f5aa100b /boot/tests
parent57878200dda049cf7d6f11c9ede6936d184649cb (diff)
downloadcatskill-30b04e4b2a90981570ae04095aeccd746ccdea6a.tar.zst
catskill-30b04e4b2a90981570ae04095aeccd746ccdea6a.zip
Add first bootstrapping transpiler test
Signed-off-by: Mel <mel@rnrd.eu>
Diffstat (limited to 'boot/tests')
-rw-r--r--boot/tests/test.c2
-rw-r--r--boot/tests/transpile/basic.cskt16
2 files changed, 17 insertions, 1 deletions
diff --git a/boot/tests/test.c b/boot/tests/test.c
index b8db80c..841df09 100644
--- a/boot/tests/test.c
+++ b/boot/tests/test.c
@@ -535,7 +535,7 @@ struct Result_Summary
 transpile_tests(bool adjust)
 {
     const ascii* base_path = "./boot/tests/transpile/";
-    const ascii* base_command = "./build/catboot";
+    const ascii* base_command = "./build/catboot --test-transpile";
 
     return tests(base_path, base_command, adjust);
 }
diff --git a/boot/tests/transpile/basic.cskt b/boot/tests/transpile/basic.cskt
new file mode 100644
index 0000000..f904259
--- /dev/null
+++ b/boot/tests/transpile/basic.cskt
@@ -0,0 +1,16 @@
+the transpiler has to follow a simple pattern of
+the files it creates to make viable c source.
+here we check that the simplest possible file has
+all of the expected parts needed.
+
+<<<
+
+main = fun () {
+}
+
+>>>
+
+#include "boot/runtime/core.c"
+void catskill_main(void) {
+}
+#include "boot/runtime/runtime.c"
\ No newline at end of file