Module: wine Branch: master Commit: 9e76799266f454876aba52df43bf7343fde0671f URL: https://gitlab.winehq.org/wine/wine/-/commit/9e76799266f454876aba52df43bf734...
Author: Alex Henrie alexhenrie24@gmail.com Date: Wed Oct 11 09:18:37 2023 -0600
msvcrt/tests: Add tests for wcsdup.
---
dlls/msvcrt/tests/string.c | 10 ++++++++++ 1 file changed, 10 insertions(+)
diff --git a/dlls/msvcrt/tests/string.c b/dlls/msvcrt/tests/string.c index 10c7fea4439..cdc19736832 100644 --- a/dlls/msvcrt/tests/string.c +++ b/dlls/msvcrt/tests/string.c @@ -649,6 +649,15 @@ static void test_strdup(void) ok(errno == 0xdeadbeef, "errno is %d, expected 0xdeadbeef\n", errno); }
+static void test_wcsdup(void) +{ + WCHAR *str; + errno = 0xdeadbeef; + str = wcsdup(0); + ok(str == 0, "wcsdup returned %s, expected NULL\n", wine_dbgstr_w(str)); + ok(errno == 0xdeadbeef, "errno is %d, expected 0xdeadbeef\n", errno); +} + static void test_strcmp(void) { int ret = p_strcmp( "abc", "abcd" ); @@ -4705,6 +4714,7 @@ START_TEST(string) test_mbsspn(); test_mbsspnp(); test_strdup(); + test_wcsdup(); test_strcmp(); test_strcpy_s(); test_memcpy_s();