summaryrefslogtreecommitdiff
path: root/deps/uv/test/test-dlerror.c
diff options
context:
space:
mode:
Diffstat (limited to 'deps/uv/test/test-dlerror.c')
-rw-r--r--deps/uv/test/test-dlerror.c19
1 files changed, 8 insertions, 11 deletions
diff --git a/deps/uv/test/test-dlerror.c b/deps/uv/test/test-dlerror.c
index 877ebf3712..091200edbe 100644
--- a/deps/uv/test/test-dlerror.c
+++ b/deps/uv/test/test-dlerror.c
@@ -26,31 +26,28 @@
TEST_IMPL(dlerror) {
const char* path = "test/fixtures/load_error.node";
+ const char* dlerror_no_error = "no error";
const char* msg;
uv_lib_t lib;
int r;
-#ifdef __linux__
- const char* dlerror_desc = "file too short";
-#elif defined (__sun__)
- const char* dlerror_desc = "unknown file type";
-#elif defined (_WIN32)
- const char* dlerror_desc = "%1 is not a valid Win32 application";
-#else
- const char* dlerror_desc = "";
-#endif
+ 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);
ASSERT(r == -1);
msg = uv_dlerror(&lib);
ASSERT(msg != NULL);
- ASSERT(strstr(msg, dlerror_desc) != NULL);
+ ASSERT(strstr(msg, dlerror_no_error) == NULL);
/* Should return the same error twice in a row. */
msg = uv_dlerror(&lib);
ASSERT(msg != NULL);
- ASSERT(strstr(msg, dlerror_desc) != NULL);
+ ASSERT(strstr(msg, dlerror_no_error) == NULL);
uv_dlclose(&lib);