Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 16 additions & 4 deletions test/test_iostream.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -514,17 +514,23 @@ void test_console()
TEST(std::getline(cin, line));
std::cout << "ASCII line read" << std::endl;
// MinGW on CI sometimes swallows the (mocked) first line or returns it multiple times
DISABLE_CONST_EXPR_DETECTED
if(isMinGW_CI && line == testStringIn2)
{
DISABLE_CONST_EXPR_DETECTED_POP
std::cout << "WARNING: MinGW CI issue detected, skipping part of test"; // LCOV_EXCL_LINE
else
} else
{
TEST_EQ(line, testStringIn1);
std::cout << "UTF-8 line read" << std::endl;
line.clear();
TEST(std::getline(cin, line));
DISABLE_CONST_EXPR_DETECTED
if(isMinGW_CI && line == testStringIn1)
{
DISABLE_CONST_EXPR_DETECTED_POP
std::cout << "WARNING: MinGW CI issue detected, skipping 1st part of test"; // LCOV_EXCL_LINE
else
} else
TEST_EQ(line, testStringIn2);
}
}
Expand All @@ -540,9 +546,12 @@ void test_console()
cout << testString << std::flush;

const auto data = stdoutHandle.getBufferData();
DISABLE_CONST_EXPR_DETECTED
if(isMinGW_CI && data.empty())
{
DISABLE_CONST_EXPR_DETECTED_POP
std::cout << "WARNING: MinGW CI issue detected, skipping part of test"; // LCOV_EXCL_LINE
else
} else
TEST_EQ(data, nw::widen(testString));
}
std::cout << "Test cerr console" << std::endl;
Expand All @@ -557,9 +566,12 @@ void test_console()
cerr << testString << std::flush;

const auto data = stderrHandle.getBufferData();
DISABLE_CONST_EXPR_DETECTED
if(isMinGW_CI && data.empty())
{
DISABLE_CONST_EXPR_DETECTED_POP
std::cout << "WARNING: MinGW CI issue detected, skipping part of test"; // LCOV_EXCL_LINE
else
} else
TEST_EQ(data, nw::widen(testString));
}
std::cout << "Console tests done" << std::endl;
Expand Down