From: Zhiyi Zhang <zzhang@codeweavers.com> This is mainly to test that ICU data is loaded properly. --- configure.ac | 1 + dlls/icu/tests/Makefile.in | 5 +++++ dlls/icu/tests/icu.c | 40 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 46 insertions(+) create mode 100644 dlls/icu/tests/Makefile.in create mode 100644 dlls/icu/tests/icu.c diff --git a/configure.ac b/configure.ac index c28bb4c3703..2ffa22e3e1c 100644 --- a/configure.ac +++ b/configure.ac @@ -2840,6 +2840,7 @@ WINE_CONFIG_MAKEFILE(dlls/icmp) WINE_CONFIG_MAKEFILE(dlls/icmui) WINE_CONFIG_MAKEFILE(dlls/icmui/tests) WINE_CONFIG_MAKEFILE(dlls/icu) +WINE_CONFIG_MAKEFILE(dlls/icu/tests) WINE_CONFIG_MAKEFILE(dlls/icuin) WINE_CONFIG_MAKEFILE(dlls/icuuc) WINE_CONFIG_MAKEFILE(dlls/ieframe) diff --git a/dlls/icu/tests/Makefile.in b/dlls/icu/tests/Makefile.in new file mode 100644 index 00000000000..e68334f095f --- /dev/null +++ b/dlls/icu/tests/Makefile.in @@ -0,0 +1,5 @@ +TESTDLL = icu.dll +IMPORTS = icu + +SOURCES = \ + icu.c diff --git a/dlls/icu/tests/icu.c b/dlls/icu/tests/icu.c new file mode 100644 index 00000000000..cf8e055bd72 --- /dev/null +++ b/dlls/icu/tests/icu.c @@ -0,0 +1,40 @@ +/* + * Unit test suite for ICU + * + * Copyright 2025 Zhiyi Zhang for CodeWeavers + * + * 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 <stdarg.h> +#include <stdint.h> +#include "windef.h" +#include "winbase.h" +#include "icu.h" +#include "wine/test.h" + +static void test_u_init(void) +{ + UErrorCode error = U_ZERO_ERROR; + + u_init(&error); + ok(error == U_ZERO_ERROR, "Got unexpected error %d.\n", error); +} + +START_TEST(icu) +{ + test_u_init(); +} -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/10322