test: check dlerror is "no error" in no error case

PR-URL: https://github.com/libuv/libuv/pull/59
Reviewed-By: Bert Belder <bertbelder@gmail.com>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
This commit is contained in:
Marc Schlaich 2014-12-11 12:24:58 +01:00 committed by Bert Belder
parent f70b69d055
commit 59f875d638

View File

@ -31,6 +31,12 @@ TEST_IMPL(dlerror) {
uv_lib_t lib; uv_lib_t lib;
int r; int r;
lib.errmsg = NULL;
lib.handle = NULL;
msg = uv_dlerror(&lib);
ASSERT(msg != NULL);
ASSERT(strstr(msg, dlerror_no_error) != NULL);
r = uv_dlopen(path, &lib); r = uv_dlopen(path, &lib);
ASSERT(r == -1); ASSERT(r == -1);