mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-06-28 15:28:30 +00:00
Remove plenty of makefile misconfigurations
This commit is contained in:
parent
9172fd42a0
commit
8b469389f6
186 changed files with 1408 additions and 901 deletions
|
@ -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));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue