mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-02 17:28:30 +00:00
Make improvements
- Expand redbean UNIX module - Expand redbean documentation - Ensure Lua copyright is embedded in binary - Increase the PATH_MAX limit especially on NT - Use column major sorting for linenoise completions - Fix some suboptimalities in redbean's new UNIX API - Figured out right flags for Multics newline in raw mode
This commit is contained in:
parent
cf3174dc74
commit
2046c0d2ae
305 changed files with 6602 additions and 4221 deletions
|
@ -114,11 +114,12 @@ void TearDownOnce(void);
|
|||
|
||||
#define ASSERT_SYS(ERRNO, WANT, GOT, ...) \
|
||||
do { \
|
||||
errno = 0; \
|
||||
int e = errno; \
|
||||
__TEST_EQ(assert, __FILE__, __LINE__, __FUNCTION__, #WANT, #GOT, WANT, \
|
||||
GOT, __VA_ARGS__); \
|
||||
__TEST_EQ(assert, __FILE__, __LINE__, __FUNCTION__, #ERRNO, \
|
||||
strerror(errno), ERRNO, errno, __VA_ARGS__); \
|
||||
errno = e; \
|
||||
} while (0)
|
||||
|
||||
#define ASSERT_BETWEEN(BEG, END, GOT) \
|
||||
|
@ -314,8 +315,8 @@ struct TestFixture {
|
|||
};
|
||||
|
||||
extern char g_fixturename[256];
|
||||
extern char g_testlib_olddir[PATH_MAX];
|
||||
extern char g_testlib_tmpdir[PATH_MAX];
|
||||
extern char g_testlib_olddir[PATH_MAX + 1];
|
||||
extern char g_testlib_tmpdir[PATH_MAX + 1];
|
||||
extern bool g_testlib_shoulddebugbreak; /* set by testmain */
|
||||
extern unsigned g_testlib_ran; /* set by wrappers */
|
||||
extern unsigned g_testlib_failed; /* set by wrappers */
|
||||
|
|
|
@ -46,9 +46,9 @@
|
|||
#include "libc/x/x.h"
|
||||
|
||||
static int x;
|
||||
char g_testlib_olddir[PATH_MAX];
|
||||
char g_testlib_tmpdir[PATH_MAX];
|
||||
struct sigaction wanthandlers[31];
|
||||
char g_testlib_olddir[PATH_MAX + 1];
|
||||
char g_testlib_tmpdir[PATH_MAX + 1];
|
||||
|
||||
void testlib_finish(void) {
|
||||
if (g_testlib_failed) {
|
||||
|
@ -142,7 +142,7 @@ static void CheckForFileDescriptors(void) {
|
|||
for (i = 0; i < ARRAYLEN(pfds); ++i) {
|
||||
if (pfds[i].revents & POLLNVAL) continue;
|
||||
++g_testlib_failed;
|
||||
fprintf(stderr, "error: test failed to close() fd %d%n", pfds[i].fd);
|
||||
fprintf(stderr, "error: test failed to close() fd %d\n", pfds[i].fd);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
@ -161,7 +161,7 @@ static void CheckForZombies(void) {
|
|||
break;
|
||||
} else {
|
||||
++g_testlib_failed;
|
||||
fprintf(stderr, "error: test failed to reap zombies %d%n", pid);
|
||||
fprintf(stderr, "error: test failed to reap zombies %d\n", pid);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue