summaryrefslogtreecommitdiff
path: root/deps/uv/test/test-error.c
diff options
context:
space:
mode:
Diffstat (limited to 'deps/uv/test/test-error.c')
-rw-r--r--deps/uv/test/test-error.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/deps/uv/test/test-error.c b/deps/uv/test/test-error.c
index a2d559a4ee..7f44f4a1bc 100644
--- a/deps/uv/test/test-error.c
+++ b/deps/uv/test/test-error.c
@@ -37,6 +37,8 @@
* See https://github.com/joyent/libuv/issues/210
*/
TEST_IMPL(error_message) {
+ char buf[32];
+
/* Cop out. Can't do proper checks on systems with
* i18n-ized error messages...
*/
@@ -49,6 +51,10 @@ TEST_IMPL(error_message) {
ASSERT(strcmp(uv_strerror(1337), "Unknown error") == 0);
ASSERT(strcmp(uv_strerror(-1337), "Unknown error") == 0);
+ ASSERT(strstr(uv_strerror_r(UV_EINVAL, buf, sizeof(buf)), "Success") == NULL);
+ ASSERT(strstr(uv_strerror_r(1337, buf, sizeof(buf)), "1337") != NULL);
+ ASSERT(strstr(uv_strerror_r(-1337, buf, sizeof(buf)), "-1337") != NULL);
+
return 0;
}