Remove plenty of makefile misconfigurations

This commit is contained in:
Justine Tunney 2022-07-21 09:16:38 -07:00
parent 9172fd42a0
commit 8b469389f6
186 changed files with 1408 additions and 901 deletions

View file

@ -22,24 +22,22 @@
#include "libc/testlib/testlib.h"
#include "libc/x/x.h"
char testlib_enable_tmp_setup_teardown;
TEST(xslurp, testEmptyWithNulTerminatedStringBehavior) {
size_t got;
const char *data;
const char *path = gc(xjoinpaths(kTmpPath, "xslurp.txt"));
ASSERT_NE(-1, xbarf(path, "", -1));
ASSERT_NE(NULL, (data = gc(xslurp(path, &got))));
ASSERT_NE(-1, xbarf("xslurp.txt", "", -1));
ASSERT_NE(NULL, (data = gc(xslurp("xslurp.txt", &got))));
ASSERT_EQ(0, got);
ASSERT_STREQ("", data);
ASSERT_NE(-1, unlink(path));
}
TEST(xslurp, testHyperion) {
size_t got;
const char *data;
const char *path = gc(xjoinpaths(kTmpPath, "xslurp.txt"));
ASSERT_NE(-1, xbarf(path, kHyperion, kHyperionSize));
ASSERT_NE(NULL, (data = gc(xslurp(path, &got))));
ASSERT_NE(-1, xbarf("xslurp.txt", kHyperion, kHyperionSize));
ASSERT_NE(NULL, (data = gc(xslurp("xslurp.txt", &got))));
ASSERT_EQ(kHyperionSize, got);
ASSERT_EQ(0, memcmp(data, kHyperion, kHyperionSize));
ASSERT_NE(-1, unlink(path));
}