From 30b04e4b2a90981570ae04095aeccd746ccdea6a Mon Sep 17 00:00:00 2001 From: Mel Date: Mon, 29 Dec 2025 00:58:21 +0100 Subject: Add first bootstrapping transpiler test Signed-off-by: Mel --- boot/tests/test.c | 2 +- boot/tests/transpile/basic.cskt | 16 ++++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 boot/tests/transpile/basic.cskt (limited to 'boot/tests') 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 -- cgit 1.4.1