Moved lib_runner's drive system into the core of the lang

This commit is contained in:
2023-03-15 06:12:35 +11:00
parent a04d2c4816
commit e2fa1cf2e8
7 changed files with 133 additions and 195 deletions

View File

@@ -6,6 +6,7 @@
#include "toy_console_colors.h"
#include "toy_memory.h"
#include "toy_drive_system.h"
#include <stdio.h>
#include <stdlib.h>
@@ -63,15 +64,9 @@ typedef struct Payload {
int main() {
//setup the runner filesystem (hacky)
Toy_initDriveDictionary();
Toy_initDriveSystem();
Toy_Literal driveLiteral = TOY_TO_STRING_LITERAL(Toy_createRefString("scripts"));
Toy_Literal pathLiteral = TOY_TO_STRING_LITERAL(Toy_createRefString("scripts"));
Toy_setLiteralDictionary(Toy_getDriveDictionary(), driveLiteral, pathLiteral);
Toy_freeLiteral(driveLiteral);
Toy_freeLiteral(pathLiteral);
Toy_setDrivePath("scripts", "scripts");
{
//run each file in test/scripts
@@ -113,7 +108,7 @@ int main() {
}
//lib cleanup
Toy_freeDriveDictionary();
Toy_freeDriveSystem();
if (!failedAsserts) {
printf(TOY_CC_NOTICE "All good\n" TOY_CC_RESET);