test: pass test when hostname is single character

PR-URL: https://github.com/libuv/libuv/pull/2741
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
This commit is contained in:
毛毛 2020-04-06 12:57:31 +02:00 committed by Ben Noordhuis
parent 7656e981b6
commit 0e8ff951f3

View File

@ -51,7 +51,7 @@ TEST_IMPL(gethostname) {
size = UV_MAXHOSTNAMESIZE;
r = uv_os_gethostname(buf, &size);
ASSERT(r == 0);
ASSERT(size > 1 && size == strlen(buf));
ASSERT(size > 0 && size == strlen(buf));
ASSERT(size + 1 == enobufs_size);
return 0;