mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-28 00:02:28 +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
|
@ -83,10 +83,8 @@ TEST(readlinkat, frootloop) {
|
|||
ASSERT_SYS(0, 0, symlink("froot", "froot"));
|
||||
ASSERT_SYS(ELOOP, -1, readlink("froot/loop", buf, sizeof(buf)));
|
||||
if (O_NOFOLLOW) {
|
||||
ASSERT_SYS(IsFreebsd() ? EMLINK
|
||||
: IsNetbsd() ? EFTYPE
|
||||
: ELOOP,
|
||||
-1, open("froot", O_RDONLY | O_NOFOLLOW));
|
||||
ASSERT_SYS(IsFreebsd() ? EMLINK : IsNetbsd() ? EFTYPE : ELOOP, -1,
|
||||
open("froot", O_RDONLY | O_NOFOLLOW));
|
||||
if (0 && O_PATH) { /* need rhel5 test */
|
||||
ASSERT_NE(-1, (fd = open("froot", O_RDONLY | O_NOFOLLOW | O_PATH)));
|
||||
ASSERT_NE(-1, close(fd));
|
||||
|
@ -101,3 +99,11 @@ TEST(readlinkat, statReadsNameLength) {
|
|||
EXPECT_TRUE(S_ISLNK(st.st_mode));
|
||||
EXPECT_EQ(5, st.st_size);
|
||||
}
|
||||
|
||||
TEST(readlinkat, realpathReturnsLongPath) {
|
||||
if (!IsWindows()) return;
|
||||
struct stat st;
|
||||
char buf[PATH_MAX];
|
||||
ASSERT_SYS(0, 0, touch("froot", 0644));
|
||||
ASSERT_STARTSWITH("//?/", realpath("froot", buf));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue