[MSVCRT_WINETEST] Add checks to not crash on reactos

This commit is contained in:
Timo Kreuzer 2025-02-03 11:08:26 +02:00
parent 748fdbcd6a
commit 4a63e19e47
3 changed files with 22 additions and 0 deletions

View file

@ -627,6 +627,9 @@ static void test_setlocale(void)
if(IsValidCodePage(atoi(buf))) {
ret = setlocale(LC_ALL, ".OCP");
ok(ret != NULL, "ret == NULL\n");
#ifdef __REACTOS__
if (ret == NULL) ptr = NULL; else
#endif
ptr = strchr(ret, '.');
ok(ptr && !strcmp(ptr + 1, buf), "ret %s, buf %s.\n", ret, buf);
}
@ -636,6 +639,9 @@ static void test_setlocale(void)
len = sprintf(buf, "%d", GetACP());
ret = setlocale(LC_ALL, ".ACP");
ok(ret != NULL, "ret == NULL\n");
#ifdef __REACTOS__
if (ret == NULL) ptr = NULL; else
#endif
ptr = strchr(ret, '.');
ok(ptr && !strncmp(ptr + 1, buf, len), "ret %s, buf %s.\n", ret, buf);

View file

@ -25,6 +25,7 @@
#include <stdio.h>
#include <math.h>
#include <process.h>
#include <versionhelpers.h>
static inline BOOL almost_equal(double d1, double d2) {
if(d1-d2>-1e-30 && d1-d2<1e-30)
@ -393,6 +394,13 @@ static void test__popen(const char *name)
ret = fputs("child-to-parent\n", pipe);
ok(ret != EOF, "fputs returned %x\n", ret);
#ifdef __REACTOS__
if (IsReactOS())
{
skip("Skipping _pclose, because it hangs on reactos\n");
return;
}
#endif
ret = _pclose(pipe);
ok(ret == 0x3, "_pclose returned %x, expected 0x3\n", ret);
}

View file

@ -37,6 +37,7 @@
#include "winbase.h"
#include "winnls.h"
#include "winuser.h"
#include <versionhelpers.h>
static char *buf_to_string(const unsigned char *bin, int len, int nr)
{
@ -2117,6 +2118,13 @@ static void test__strtod(void)
for (i=0; i<ARRAY_SIZE(tests); i++)
{
#ifdef __REACTOS__
if ((i == 19) && IsReactOS())
{
skip("Skipping i == 19, because it crashes on ReactOS\n");
continue;
}
#endif
errno = 0xdeadbeef;
d = strtod(tests[i].str, &end);
ok(d == tests[i].ret, "%d) d = %.16e\n", i, d);