Daniel Lehman : msvcr100/tests: Add setlocale test.
Module: wine Branch: master Commit: 0e882c6bf116e442c8c9fa9a29115197c58c2f9c URL: https://source.winehq.org/git/wine.git/?a=commit;h=0e882c6bf116e442c8c9fa9a2... Author: Daniel Lehman <dlehman(a)esri.com> Date: Tue May 1 15:30:08 2018 -0700 msvcr100/tests: Add setlocale test. Signed-off-by: Daniel Lehman <dlehman(a)esri.com> Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/msvcr100/tests/msvcr100.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/dlls/msvcr100/tests/msvcr100.c b/dlls/msvcr100/tests/msvcr100.c index f02f5ea..bd95991 100644 --- a/dlls/msvcr100/tests/msvcr100.c +++ b/dlls/msvcr100/tests/msvcr100.c @@ -26,6 +26,8 @@ #include <winbase.h> #include "wine/test.h" +#include <locale.h> + #define DEFINE_EXPECT(func) \ static BOOL expect_ ## func = FALSE, called_ ## func = FALSE @@ -232,6 +234,8 @@ static unsigned int (__cdecl *p_CurrentScheduler_Id)(void); static int (__cdecl *p__memicmp)(const char*, const char*, size_t); static int (__cdecl *p__memicmp_l)(const char*, const char*, size_t,_locale_t); +static char* (__cdecl *p_setlocale)(int, const char*); + /* make sure we use the correct errno */ #undef errno #define errno (*p_errno()) @@ -265,6 +269,7 @@ static BOOL init(void) SET(p_atoi, "atoi"); SET(p__memicmp, "_memicmp"); SET(p__memicmp_l, "_memicmp_l"); + SET(p_setlocale, "setlocale"); SET(p_Context_Id, "?Id(a)Context@Concurrency@@SAIXZ"); SET(p_CurrentScheduler_Detach, "?Detach(a)CurrentScheduler@Concurrency@@SAXXZ"); @@ -1052,6 +1057,14 @@ static void test__memicmp_l(void) "Cannot reset invalid parameter handler\n"); } +static void test_setlocale(void) +{ + char *ret; + + ret = p_setlocale(LC_ALL, "en-US"); + ok(!ret, "got %p\n", ret); +} + START_TEST(msvcr100) { if (!init()) @@ -1070,4 +1083,5 @@ START_TEST(msvcr100) test_event(); test__memicmp(); test__memicmp_l(); + test_setlocale(); }
participants (1)
-
Alexandre Julliard