diff options
Diffstat (limited to 'lib/mlibc/tests/posix/getservbyname.c')
-rw-r--r-- | lib/mlibc/tests/posix/getservbyname.c | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/lib/mlibc/tests/posix/getservbyname.c b/lib/mlibc/tests/posix/getservbyname.c deleted file mode 100644 index 8c51710..0000000 --- a/lib/mlibc/tests/posix/getservbyname.c +++ /dev/null @@ -1,27 +0,0 @@ -#include <assert.h> -#include <netdb.h> -#include <string.h> -#include <arpa/inet.h> - -int main() { - struct servent *ret = getservbyname("http", "tcp"); - assert(ret); - assert(!strcmp("http", ret->s_name)); - assert(ret->s_port == htons(80)); - assert(!strcmp("tcp", ret->s_proto)); - - ret = getservbyname("http", NULL); - assert(ret); - assert(!strcmp("http", ret->s_name)); - assert(ret->s_port == htons(80)); - assert(!strcmp("tcp", ret->s_proto)); - - ret = getservbyname("babel", "udp"); - assert(ret); - ret = getservbyname("babel", "tcp"); - assert(!ret); - - ret = getservbyname("", NULL); - assert(!ret); - return 0; -} |