Consolidate build into one root Makefile; split run.sh into run-engine.sh/run-interpreter.sh

This commit is contained in:
ml
2026-07-05 16:35:18 +02:00
parent bd739ccfdf
commit 28558b4343
12 changed files with 300 additions and 199 deletions
+5 -5
View File
@@ -137,13 +137,13 @@ static void test_reading_print_json_shape(void) {
printf("PASS test_reading_print_json_shape\n");
}
/* Run with cwd == engine/ (as `make test` does), so the shipped
* engine/i18n/ .lang files are reachable as i18n/<code>.lang. */
/* Run with cwd == repo root (as `make test` does), so the shipped
* engine/i18n/ .lang files are reachable at that path. */
static void test_i18n_fallback_and_translation(void) {
/* No catalog loaded yet: every lookup returns the caller's fallback. */
assert(strcmp(i18n_get("does.not.exist", "fallback text"), "fallback text") == 0);
bool loaded = i18n_load("i18n/de.lang");
bool loaded = i18n_load("engine/i18n/de.lang");
assert(loaded && "expected engine/i18n/de.lang to exist and load");
assert(strcmp(i18n_get("body.sun", "Sun"), "Sonne") == 0);
assert(strcmp(i18n_get("does.not.exist", "fallback text"), "fallback text") == 0);
@@ -158,11 +158,11 @@ static void test_i18n_fallback_and_translation(void) {
/* Loading a file that doesn't exist fails and leaves the previously
* loaded catalog in place, rather than silently clearing it. */
assert(!i18n_load("i18n/does-not-exist.lang"));
assert(!i18n_load("engine/i18n/does-not-exist.lang"));
assert(strcmp(i18n_get("body.sun", "Sun"), "Sonne") == 0);
/* Loading a different language replaces the catalog wholesale. */
loaded = i18n_load("i18n/en.lang");
loaded = i18n_load("engine/i18n/en.lang");
assert(loaded);
assert(strcmp(astro_body_name(PLANET_MOON), "Moon") == 0);