diff --git a/dlls/kernel32/tests/console.c b/dlls/kernel32/tests/console.c index c3fa57c44d5..33eab268e9c 100644 --- a/dlls/kernel32/tests/console.c +++ b/dlls/kernel32/tests/console.c @@ -270,6 +270,7 @@ static void testWriteNotWrappedProcessed(HANDLE hCon, COORD sbSize) const int mylen = strlen(mytest); const int mylen2 = strchr(mytest, '\n') - mytest; int p; + WORD attr; ok(GetConsoleMode(hCon, &mode) && SetConsoleMode(hCon, (mode | ENABLE_PROCESSED_OUTPUT) & ~ENABLE_WRAP_AT_EOL_OUTPUT), "clearing wrap at EOL & setting processed output\n"); @@ -284,6 +285,15 @@ static void testWriteNotWrappedProcessed(HANDLE hCon, COORD sbSize) { okCHAR(hCon, c, mytest[c.X - sbSize.X + 5], TEST_ATTRIB); } + + ReadConsoleOutputAttribute(hCon, &attr, 1, c, &len); + /* Win9x and WinMe change the attribs for '\n' up to 'f' */ + if (attr == TEST_ATTRIB) + { + win_skip("Win9x/WinMe don't respect ~ENABLE_WRAP_AT_EOL_OUTPUT\n"); + return; + } + okCHAR(hCon, c, ' ', DEFAULT_ATTRIB); c.X = 0; c.Y++; @@ -381,6 +391,7 @@ static void testWriteWrappedProcessed(HANDLE hCon, COORD sbSize) const char* mytest = "abcd\nf\tg"; const int mylen = strlen(mytest); int p; + WORD attr; ok(GetConsoleMode(hCon, &mode) && SetConsoleMode(hCon, mode | (ENABLE_WRAP_AT_EOL_OUTPUT|ENABLE_PROCESSED_OUTPUT)), "setting wrap at EOL & processed output\n"); @@ -396,7 +407,11 @@ static void testWriteWrappedProcessed(HANDLE hCon, COORD sbSize) okCHAR(hCon, c, mytest[p], TEST_ATTRIB); } c.X = sbSize.X - 9 + p; - okCHAR(hCon, c, ' ', DEFAULT_ATTRIB); + ReadConsoleOutputAttribute(hCon, &attr, 1, c, &len); + if (attr == TEST_ATTRIB) + win_skip("Win9x/WinMe changes attribs for '\\n' up to 'f'\n"); + else + okCHAR(hCon, c, ' ', DEFAULT_ATTRIB); c.X = 0; c.Y++; okCHAR(hCon, c, mytest[5], TEST_ATTRIB); for (c.X = 1; c.X < 8; c.X++) @@ -419,7 +434,11 @@ static void testWriteWrappedProcessed(HANDLE hCon, COORD sbSize) c.X = 0; c.Y++; okCHAR(hCon, c, mytest[3], TEST_ATTRIB); c.X++; - okCHAR(hCon, c, ' ', DEFAULT_ATTRIB); + ReadConsoleOutputAttribute(hCon, &attr, 1, c, &len); + if (attr == TEST_ATTRIB) + win_skip("Win9x/WinMe changes attribs for '\\n' up to 'f'\n"); + else + okCHAR(hCon, c, ' ', DEFAULT_ATTRIB); c.X = 0; c.Y++; okCHAR(hCon, c, mytest[5], TEST_ATTRIB);