Commit d0e8c9a1 authored by Daniel Lehman's avatar Daniel Lehman Committed by Alexandre Julliard

msvcr110/tests: Add setlocale tests.

parent 0e882c6b
......@@ -18837,6 +18837,7 @@ wine_fn_config_makefile dlls/msvcp90/tests enable_tests
wine_fn_config_makefile dlls/msvcr100 enable_msvcr100
wine_fn_config_makefile dlls/msvcr100/tests enable_tests
wine_fn_config_makefile dlls/msvcr110 enable_msvcr110
wine_fn_config_makefile dlls/msvcr110/tests enable_tests
wine_fn_config_makefile dlls/msvcr120 enable_msvcr120
wine_fn_config_makefile dlls/msvcr120/tests enable_tests
wine_fn_config_makefile dlls/msvcr120_app enable_msvcr120_app
......
......@@ -3459,6 +3459,7 @@ WINE_CONFIG_MAKEFILE(dlls/msvcp90/tests)
WINE_CONFIG_MAKEFILE(dlls/msvcr100)
WINE_CONFIG_MAKEFILE(dlls/msvcr100/tests)
WINE_CONFIG_MAKEFILE(dlls/msvcr110)
WINE_CONFIG_MAKEFILE(dlls/msvcr110/tests)
WINE_CONFIG_MAKEFILE(dlls/msvcr120)
WINE_CONFIG_MAKEFILE(dlls/msvcr120/tests)
WINE_CONFIG_MAKEFILE(dlls/msvcr120_app)
......
TESTDLL = msvcr110.dll
APPMODE = -mno-cygwin
C_SRCS = \
msvcr110.c
/*
* Copyright 2018 Daniel Lehman
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <errno.h>
#include <stdarg.h>
#include <stdlib.h>
#include <wchar.h>
#include <stdio.h>
#include <float.h>
#include <limits.h>
#include <windef.h>
#include <winbase.h>
#include <winnls.h>
#include "wine/test.h"
#include <locale.h>
static char* (CDECL *p_setlocale)(int category, const char* locale);
static BOOL init(void)
{
HMODULE module;
module = LoadLibraryA("msvcr110.dll");
if (!module)
{
win_skip("msvcr110.dll not installed\n");
return FALSE;
}
p_setlocale = (void*)GetProcAddress(module, "setlocale");
return TRUE;
}
static void test_setlocale(void)
{
int i;
char *ret;
static const char *names[] =
{
"en-us",
"en-US",
"EN-US",
"syr-SY",
"uz-Latn-uz",
};
for(i=0; i<sizeof(names)/sizeof(*names); i++) {
ret = p_setlocale(LC_ALL, names[i]);
todo_wine ok(!!ret, "expected success, but got NULL\n");
if(ret) ok(!strcmp(ret, names[i]),
"expected %s, got %s\n", names[i], ret);
}
p_setlocale(LC_ALL, "C");
}
START_TEST(msvcr110)
{
if (!init()) return;
test_setlocale();
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment