tests/auto/xmlpatternsvalidator/tst_xmlpatternsvalidator.cpp
changeset 23 89e065397ea6
parent 19 fcece45ef507
child 37 758a864f9613
equal deleted inserted replaced
22:79de32ba3296 23:89e065397ea6
   109     if(!cwd.isEmpty())
   109     if(!cwd.isEmpty())
   110         process.setWorkingDirectory(inputFile(cwd));
   110         process.setWorkingDirectory(inputFile(cwd));
   111 
   111 
   112     process.start(m_command, arguments);
   112     process.start(m_command, arguments);
   113 
   113 
       
   114     QVERIFY(process.waitForFinished());
   114     QCOMPARE(process.exitStatus(), QProcess::NormalExit);
   115     QCOMPARE(process.exitStatus(), QProcess::NormalExit);
   115     QVERIFY(process.waitForFinished());
       
   116 
   116 
   117     if(process.exitCode() != expectedExitCode)
   117     if(process.exitCode() != expectedExitCode)
   118         QTextStream(stderr) << "foo:" << process.readAllStandardError();
   118         QTextStream(stderr) << "foo:" << process.readAllStandardError();
   119 
   119 
   120     QCOMPARE(process.exitCode(), expectedExitCode);
   120     QCOMPARE(process.exitCode(), expectedExitCode);
   195     QTest::newRow("A non-schema aware instance document")
   195     QTest::newRow("A non-schema aware instance document")
   196         << 1
   196         << 1
   197         << (QStringList() << QLatin1String("files/instance.xml"))
   197         << (QStringList() << QLatin1String("files/instance.xml"))
   198         << QString();
   198         << QString();
   199 
   199 
   200     QTest::newRow("A schema with an indirectly included type")
   200     QTest::newRow("QTBUG-8394 A schema with an indirectly included type")
   201         << 0
   201         << 0
   202         << (QStringList() << QLatin1String("files/indirect-include-a.xsd"))
   202         << (QStringList() << QLatin1String("files/indirect-include-a.xsd"))
   203         << QString();
   203         << QString();
   204 
   204 
   205     QTest::newRow("A schema with an indirectly imported type")
   205     QTest::newRow("QTBUG-8394 A schema with an indirectly imported type")
   206         << 0
   206         << 0
   207         << (QStringList() << QLatin1String("files/indirect-import-a.xsd"))
   207         << (QStringList() << QLatin1String("files/indirect-import-a.xsd"))
   208         << QString();
   208         << QString();
   209 
   209 
   210     QTest::newRow("A schema with an indirectly redefined type")
   210     QTest::newRow("QTBUG-8394 A schema with an indirectly redefined type")
   211         << 0
   211         << 0
   212         << (QStringList() << QLatin1String("files/indirect-redefine-a.xsd"))
   212         << (QStringList() << QLatin1String("files/indirect-redefine-a.xsd"))
       
   213         << QString();
       
   214 
       
   215     QTest::newRow("QTBUG-8920 A schema with a complex type that indirectly includes an anonymous type")
       
   216         << 0
       
   217         << (QStringList() << QLatin1String("files/complex-type-including-anonymous-type.xsd"))
   213         << QString();
   218         << QString();
   214 }
   219 }
   215 
   220 
   216 QTEST_MAIN(tst_XmlPatternsValidator)
   221 QTEST_MAIN(tst_XmlPatternsValidator)
   217 
   222