interpret/test/test_text.c
2022-12-26 23:31:08 -08:00

19 lines
343 B
C

#include "../src/text.h"
#include <stdlib.h>
#include <stdio.h>
int main(void) {
struct text t = text();
char *content;
int success = EXIT_SUCCESS;
if(!(content = text_append_file(&t, "Makefile"))) goto catch;
printf("%s", content);
goto finally;
catch:
success = EXIT_FAILURE;
perror("text");
finally:
text_(&t);
return success;
}