Skip to content

Commit 4a63e19

Browse files
committed
[MSVCRT_WINETEST] Add checks to not crash on reactos
1 parent 748fdbc commit 4a63e19

File tree

3 files changed

+22
-0
lines changed

3 files changed

+22
-0
lines changed

modules/rostests/winetests/msvcrt/locale.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -627,6 +627,9 @@ static void test_setlocale(void)
627627
if(IsValidCodePage(atoi(buf))) {
628628
ret = setlocale(LC_ALL, ".OCP");
629629
ok(ret != NULL, "ret == NULL\n");
630+
#ifdef __REACTOS__
631+
if (ret == NULL) ptr = NULL; else
632+
#endif
630633
ptr = strchr(ret, '.');
631634
ok(ptr && !strcmp(ptr + 1, buf), "ret %s, buf %s.\n", ret, buf);
632635
}
@@ -636,6 +639,9 @@ static void test_setlocale(void)
636639
len = sprintf(buf, "%d", GetACP());
637640
ret = setlocale(LC_ALL, ".ACP");
638641
ok(ret != NULL, "ret == NULL\n");
642+
#ifdef __REACTOS__
643+
if (ret == NULL) ptr = NULL; else
644+
#endif
639645
ptr = strchr(ret, '.');
640646
ok(ptr && !strncmp(ptr + 1, buf, len), "ret %s, buf %s.\n", ret, buf);
641647

modules/rostests/winetests/msvcrt/misc.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
#include <stdio.h>
2626
#include <math.h>
2727
#include <process.h>
28+
#include <versionhelpers.h>
2829

2930
static inline BOOL almost_equal(double d1, double d2) {
3031
if(d1-d2>-1e-30 && d1-d2<1e-30)
@@ -393,6 +394,13 @@ static void test__popen(const char *name)
393394
ret = fputs("child-to-parent\n", pipe);
394395
ok(ret != EOF, "fputs returned %x\n", ret);
395396

397+
#ifdef __REACTOS__
398+
if (IsReactOS())
399+
{
400+
skip("Skipping _pclose, because it hangs on reactos\n");
401+
return;
402+
}
403+
#endif
396404
ret = _pclose(pipe);
397405
ok(ret == 0x3, "_pclose returned %x, expected 0x3\n", ret);
398406
}

modules/rostests/winetests/msvcrt/string.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
#include "winbase.h"
3838
#include "winnls.h"
3939
#include "winuser.h"
40+
#include <versionhelpers.h>
4041

4142
static char *buf_to_string(const unsigned char *bin, int len, int nr)
4243
{
@@ -2117,6 +2118,13 @@ static void test__strtod(void)
21172118

21182119
for (i=0; i<ARRAY_SIZE(tests); i++)
21192120
{
2121+
#ifdef __REACTOS__
2122+
if ((i == 19) && IsReactOS())
2123+
{
2124+
skip("Skipping i == 19, because it crashes on ReactOS\n");
2125+
continue;
2126+
}
2127+
#endif
21202128
errno = 0xdeadbeef;
21212129
d = strtod(tests[i].str, &end);
21222130
ok(d == tests[i].ret, "%d) d = %.16e\n", i, d);

0 commit comments

Comments
 (0)