Files
dusk/test/duskscript/assets/fixture_numbers.ds
T
YourWishesandClaude Sonnet 5 a0294aae98 Load duskscript files through the asset system, not the real filesystem
scriptLoadHandler used fopen/fread directly, but every .ds a script include()s
is packed into dusk.dsk (compiled to .dsb) like every other asset now, not a
loose file next to the binary - raw filesystem reads never found them outside
a dev checkout. It now goes through assetFileInit/Open/Read/Close like the
rest of the engine's asset loaders, failing the load the same way (returning
SCRIPT_LOAD_FAILED) for a missing entry or one bigger than capacity.

test_duskscript's fixtures moved to their own assets/ subfolder and pack into
a small test.dsk with the same tools.asset.pack used for the real dusk.dsk,
and the test opens that archive straight into ASSET.zip (skipping the full
assetInit()/assetInitPlatform(), which expects a launched engine) so the
tests exercise the real compile -> pack -> asset -> runtime pipeline instead
of a filesystem shortcut around it.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
2026-10-14 22:33:46 -05:00

21 lines
396 B
Plaintext

consolePrint(tostr(3 + 2));
consolePrint(tostr(1.5 + 2.25));
consolePrint(tostr(10 / 4));
consolePrint(tostr(3 < 2));
var i = 0;
var sum = 0;
while(i < 5) {
sum = sum + i;
i = i + 1;
}
consolePrint(tostr(sum));
var arr = [10, 20, 30];
consolePrint(tostr(arr[1]));
consolePrint(tostr(5 & 3));
consolePrint(tostr(1 << 4));
consolePrint(tostr(floor(3.7)));
consolePrint(tostr(tonum("3.5")));