summaryrefslogtreecommitdiff
path: root/tests/port
diff options
context:
space:
mode:
authorAndreas Baumann <abaumann@yahoo.com>2009-03-28 16:11:32 +0100
committerAndreas Baumann <abaumann@yahoo.com>2009-03-28 16:11:32 +0100
commit7373b4bf797355d67651e0d4ecc59c7cf5a433f3 (patch)
tree03761a446c269782f948295402b7addfbb4f54d9 /tests/port
parent472856b00dd596cba47c5026317a8c88226b74c8 (diff)
downloadwolfbones-7373b4bf797355d67651e0d4ecc59c7cf5a433f3.tar.gz
wolfbones-7373b4bf797355d67651e0d4ecc59c7cf5a433f3.tar.bz2
started to add getaddrinfo and netdb port stub
Diffstat (limited to 'tests/port')
-rw-r--r--tests/port/GNUmakefile5
-rw-r--r--tests/port/test_getaddrinfo.c14
2 files changed, 18 insertions, 1 deletions
diff --git a/tests/port/GNUmakefile b/tests/port/GNUmakefile
index 47f0a61..ea6794c 100644
--- a/tests/port/GNUmakefile
+++ b/tests/port/GNUmakefile
@@ -15,7 +15,8 @@ TEST_BINS = \
test_snprintf$(EXE) \
test_strlcpy$(EXE) \
test_strlcat$(EXE) \
- test_itoa$(EXE)
+ test_itoa$(EXE) \
+ test_getaddrinfo$(EXE)
-include $(TOPDIR)/makefiles/gmake/sub.mk
@@ -51,3 +52,5 @@ local_test:
@./test_strlcat > /dev/null
@echo "Testing itoa.."
@./test_itoa > /dev/null
+ @echo "Testing getaddrinfo.."
+ @./test_getaddrinfo > /dev/null
diff --git a/tests/port/test_getaddrinfo.c b/tests/port/test_getaddrinfo.c
new file mode 100644
index 0000000..66dc639
--- /dev/null
+++ b/tests/port/test_getaddrinfo.c
@@ -0,0 +1,14 @@
+#include "port/sys.h"
+
+#define TEST_GETADDRINFO
+#include "port/netdb.c" /* for getaddrinfo */
+
+#include <stdlib.h> /* for exit, EXIT_SUCCESS, free */
+
+int main( void ) {
+ wolf_port_getaddrinfo( );
+
+ if( 0 ) return EXIT_FAILURE;
+
+ return EXIT_SUCCESS;
+}