tests: disable tests for DBCS code pages with msvcrt10.dll Calling msvcrt10.dll's setlocale with locale string which requests DBCS code page results in runtime error. Signed-off-by: Kirill Makurin <maiddaisuki@outlook.com> Signed-off-by: LIU Hao <lh_mouse@126.com>
diff --git a/mingw-w64-crt/testcases/t_btowc.c b/mingw-w64-crt/testcases/t_btowc.c index 8137a82..cb71973 100644 --- a/mingw-w64-crt/testcases/t_btowc.c +++ b/mingw-w64-crt/testcases/t_btowc.c
@@ -54,6 +54,14 @@ } /** + * Disable tests for DBCS code pages with msvcrt10.dll since it does not + * support multibyte characters. + * + * Calling setlocale with locale string which requests DBCS code page + * result in runtime error. + */ +#if __MSVCRT_VERSION__ != 0x0100 + /** * Test DBCS code page */ assert (setlocale (LC_ALL, "Japanese_Japan.932") != NULL); @@ -74,7 +82,7 @@ assert (btowc (c) == WEOF); } } - +#endif #ifdef _UCRT /** * Test UTF-8
diff --git a/mingw-w64-crt/testcases/t_mbrlen.c b/mingw-w64-crt/testcases/t_mbrlen.c index 62051d6..e169107 100644 --- a/mingw-w64-crt/testcases/t_mbrlen.c +++ b/mingw-w64-crt/testcases/t_mbrlen.c
@@ -90,6 +90,14 @@ } /** + * Disable tests for DBCS code pages with msvcrt10.dll since it does not + * support multibyte characters. + * + * Calling setlocale with locale string which requests DBCS code page + * result in runtime error. + */ +#if __MSVCRT_VERSION__ != 0x0100 + /** * Test DBCS code page */ assert (setlocale (LC_ALL, "Japanese_Japan.932") != NULL); @@ -139,6 +147,6 @@ assert (mbrlen ((char *) InvalidMultibyte, MB_CUR_MAX, &state) == (size_t) -1); assert (mbsinit (&state)); assert (errno == EILSEQ); - +#endif return 0; }
diff --git a/mingw-w64-crt/testcases/t_mbrtowc.c b/mingw-w64-crt/testcases/t_mbrtowc.c index 0e58946..c33cc22 100644 --- a/mingw-w64-crt/testcases/t_mbrtowc.c +++ b/mingw-w64-crt/testcases/t_mbrtowc.c
@@ -102,6 +102,14 @@ } /** + * Disable tests for DBCS code pages with msvcrt10.dll since it does not + * support multibyte characters. + * + * Calling setlocale with locale string which requests DBCS code page + * result in runtime error. + */ +#if __MSVCRT_VERSION__ != 0x0100 + /** * Test DBCS code page */ assert (setlocale (LC_ALL, "Japanese_Japan.932") != NULL); @@ -164,6 +172,6 @@ assert (wc == WEOF); assert (mbsinit (&state)); assert (errno == EILSEQ); - +#endif return 0; }
diff --git a/mingw-w64-crt/testcases/t_mbsrtowcs.c b/mingw-w64-crt/testcases/t_mbsrtowcs.c index d53103f..e85719e 100644 --- a/mingw-w64-crt/testcases/t_mbsrtowcs.c +++ b/mingw-w64-crt/testcases/t_mbsrtowcs.c
@@ -194,6 +194,14 @@ assert (buffer[8] == WEOF); /** + * Disable tests for DBCS code pages with msvcrt10.dll since it does not + * support multibyte characters. + * + * Calling setlocale with locale string which requests DBCS code page + * result in runtime error. + */ +#if __MSVCRT_VERSION__ != 0x0100 + /** * Test DBCS code page */ assert (setlocale (LC_ALL, "Japanese_Japan.932") != NULL); @@ -372,6 +380,6 @@ assert (errno == EILSEQ); /* This assertion fails with CRT's version */ assert (buffer[0] != WEOF && buffer[1] != WEOF && buffer[2] == WEOF); - +#endif return 0; }
diff --git a/mingw-w64-crt/testcases/t_wcrtomb.c b/mingw-w64-crt/testcases/t_wcrtomb.c index d6e7c05..99329f2 100644 --- a/mingw-w64-crt/testcases/t_wcrtomb.c +++ b/mingw-w64-crt/testcases/t_wcrtomb.c
@@ -150,6 +150,14 @@ } /** + * Disable tests for DBCS code pages with msvcrt10.dll since it does not + * support multibyte characters. + * + * Calling setlocale with locale string which requests DBCS code page + * result in runtime error. + */ +#if __MSVCRT_VERSION__ != 0x0100 + /** * Test DBCS code page */ assert (setlocale (LC_ALL, "Japanese_Japan.932") != NULL); @@ -202,6 +210,6 @@ break; } } - +#endif return 0; }
diff --git a/mingw-w64-crt/testcases/t_wcsrtombs.c b/mingw-w64-crt/testcases/t_wcsrtombs.c index 87fbe96..2a78c78 100644 --- a/mingw-w64-crt/testcases/t_wcsrtombs.c +++ b/mingw-w64-crt/testcases/t_wcsrtombs.c
@@ -352,6 +352,14 @@ _set_errno (0); /** + * Disable tests for DBCS code pages with msvcrt10.dll since it does not + * support multibyte characters. + * + * Calling setlocale with locale string which requests DBCS code page + * result in runtime error. + */ +#if __MSVCRT_VERSION__ != 0x0100 + /** * Test DBCS code page */ assert (setlocale (LC_ALL, "Japanese_Japan.932") != NULL); @@ -565,6 +573,6 @@ // reset errno _set_errno (0); - +#endif return 0; }
diff --git a/mingw-w64-crt/testcases/t_wctob.c b/mingw-w64-crt/testcases/t_wctob.c index a89064b..00f10ab 100644 --- a/mingw-w64-crt/testcases/t_wctob.c +++ b/mingw-w64-crt/testcases/t_wctob.c
@@ -63,6 +63,14 @@ } /** + * Disable tests for DBCS code pages with msvcrt10.dll since it does not + * support multibyte characters. + * + * Calling setlocale with locale string which requests DBCS code page + * result in runtime error. + */ +#if __MSVCRT_VERSION__ != 0x0100 + /** * Test DBCS code page */ assert (setlocale (LC_ALL, "Japanese_Japan.932") != NULL); @@ -96,7 +104,7 @@ break; } } - +#endif #ifdef _UCRT /** * Test UTF-8