#include "../src/text.h"
#include <stdlib.h>
#include <stdio.h>
#include <errno.h>

int main(void) {
	struct char_array t = text();
	char *content;
	int success = EXIT_SUCCESS;
	errno = 0; /* `errno` is not set correctly to 0 in some debug situations. */
	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;
}
