mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-08-26 19:33:31 +00:00
[ROSAUTOTEST] Fix handling of empty test lists
Throw a test exception from GetNextTest if DoListCommand() returned an empty string, instead of continuing with a NULL buffer.
This commit is contained in:
@@ -60,6 +60,10 @@ CWineTest::GetNextFile()
|
||||
bool FoundFile = false;
|
||||
WIN32_FIND_DATAW fd;
|
||||
|
||||
/* Reset the test list */
|
||||
m_ListBuffer = NULL;
|
||||
m_ListString.clear();
|
||||
|
||||
/* Did we already begin searching for files? */
|
||||
if (m_hFind)
|
||||
{
|
||||
@@ -211,6 +215,13 @@ CWineTest::GetNextTest()
|
||||
/* Perform the --list command */
|
||||
BufferSize = DoListCommand();
|
||||
|
||||
if ((BufferSize == 0) || (m_ListBuffer == NULL))
|
||||
{
|
||||
stringstream ss;
|
||||
ss << "The --list command did not return any data for " << UnicodeToAscii(m_CurrentFile) << endl;
|
||||
TESTEXCEPTION(ss.str());
|
||||
}
|
||||
|
||||
/* Move the pointer to the first test */
|
||||
pStart = strchr(m_ListBuffer, '\n');
|
||||
pStart += 5;
|
||||
|
||||
Reference in New Issue
Block a user