interpret/test/test_text.c

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;
}