https://git.reactos.org/?p=reactos.git;a=commitdiff;h=4a63e19e47ef12ea630ec…
commit 4a63e19e47ef12ea630ec69205f9b303b0df14e3
Author: Timo Kreuzer <timo.kreuzer(a)reactos.org>
AuthorDate: Mon Feb 3 11:08:26 2025 +0200
Commit: Timo Kreuzer <timo.kreuzer(a)reactos.org>
CommitDate: Wed Feb 12 16:54:45 2025 +0200
[MSVCRT_WINETEST] Add checks to not crash on reactos
---
modules/rostests/winetests/msvcrt/locale.c | 6 ++++++
modules/rostests/winetests/msvcrt/misc.c | 8 ++++++++
modules/rostests/winetests/msvcrt/string.c | 8 ++++++++
3 files changed, 22 insertions(+)
diff --git a/modules/rostests/winetests/msvcrt/locale.c
b/modules/rostests/winetests/msvcrt/locale.c
index 62632ce4b9d..a9ade6f5c41 100644
--- a/modules/rostests/winetests/msvcrt/locale.c
+++ b/modules/rostests/winetests/msvcrt/locale.c
@@ -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);
diff --git a/modules/rostests/winetests/msvcrt/misc.c
b/modules/rostests/winetests/msvcrt/misc.c
index 7b54b3aeb88..cb7dc24e18c 100644
--- a/modules/rostests/winetests/msvcrt/misc.c
+++ b/modules/rostests/winetests/msvcrt/misc.c
@@ -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);
}
diff --git a/modules/rostests/winetests/msvcrt/string.c
b/modules/rostests/winetests/msvcrt/string.c
index b6115c08bd1..f88d672d573 100644
--- a/modules/rostests/winetests/msvcrt/string.c
+++ b/modules/rostests/winetests/msvcrt/string.c
@@ -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);