]>
git.saurik.com Git - apple/libc.git/blob - tests/ctermid.c
3 #include <darwintest.h>
5 T_DECL(ctermid
, "ctermid")
7 char term
[L_ctermid
] = { '\0' };
8 char *ptr
= ctermid(term
);
9 T_EXPECT_EQ((void*)term
, (void*)ptr
, "ctermid should return the buffer it received");
10 T_EXPECT_GT(strlen(ptr
), 0ul, "the controlling terminal should have a name");
13 T_DECL(ctermid_null
, "ctermid(NULL)")
15 char *ptr
= ctermid(NULL
);
16 T_EXPECT_GT(strlen(ptr
), 0ul, "the controlling terminal should have a name");