summaryrefslogtreecommitdiff
path: root/tests/tcp.c
diff options
context:
space:
mode:
authorMartin Sustrik <sustrik@250bpm.com>2013-09-04 11:20:36 +0200
committerMartin Sustrik <sustrik@250bpm.com>2013-09-04 11:20:36 +0200
commit9a0f5d4d3a845231396f5c2353f8b9f5a93c646e (patch)
tree71d9202a4cbcbc370bfd06dd52e50105d4623081 /tests/tcp.c
parent56d84f537dafaa51174d84159c9a4e6c6e3ad303 (diff)
downloadnanomsg-9a0f5d4d3a845231396f5c2353f8b9f5a93c646e.tar.gz
Hostname lables are not allowed to be empty
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
Diffstat (limited to 'tests/tcp.c')
-rw-r--r--tests/tcp.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/tcp.c b/tests/tcp.c
index abba9a1..9b5e18e 100644
--- a/tests/tcp.c
+++ b/tests/tcp.c
@@ -117,6 +117,15 @@ int main ()
rc = nn_connect (sc, "tcp://[::1]:5555");
nn_assert (rc < 0);
errno_assert (nn_errno () == EINVAL);
+ rc = nn_connect (sc, "tcp://abc.123.:5555");
+ nn_assert (rc < 0);
+ errno_assert (nn_errno () == EINVAL);
+ rc = nn_connect (sc, "tcp://abc...123:5555");
+ nn_assert (rc < 0);
+ errno_assert (nn_errno () == EINVAL);
+ rc = nn_connect (sc, "tcp://.123:5555");
+ nn_assert (rc < 0);
+ errno_assert (nn_errno () == EINVAL);
/* Connect correctly. Do so before binding the peer socket. */
rc = nn_connect (sc, SOCKET_ADDRESS);