#include <stdio.h>
#include <stdlib.h>

int main() {
    FILE *p = _popen(".\\target\\debug\\ts-native.exe test_simple.ts 2>&1", "r");
    if (!p) { printf("FAILED TO RUN\n"); return 1; }
    char buf[4096];
    while (fgets(buf, sizeof(buf), p)) { printf("%s", buf); }
    int rc = _pclose(p);
    printf("EXIT CODE: %d\n", rc);
    return 0;
}