X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=tests%2Fauto%2Fqxmlquery%2Ftst_qxmlquery.cpp;h=1b5d424a8e2ed51443c5b5f107fa81cd30a7dff0;hb=c1623a0d42c9869e5a1d04081e7660722a863de5;hp=9c8461caf6ef4969ff1038de2e62189f93fdf6e2;hpb=2772027a20551d26364c2816e51fcabb20773e74;p=profile%2Fivi%2Fqtxmlpatterns.git diff --git a/tests/auto/qxmlquery/tst_qxmlquery.cpp b/tests/auto/qxmlquery/tst_qxmlquery.cpp index 9c8461c..1b5d424 100644 --- a/tests/auto/qxmlquery/tst_qxmlquery.cpp +++ b/tests/auto/qxmlquery/tst_qxmlquery.cpp @@ -1728,7 +1728,7 @@ void tst_QXmlQuery::messageXML() const query.setQuery(QLatin1String("1basicSyntaxError")); - const QRegExp removeFilename(QLatin1String("Location: file:.*\\#")); + QRegExp removeFilename(QLatin1String("Location: file:.*\\#")); QVERIFY(removeFilename.isValid()); QVERIFY(messageValidator.success()); @@ -2020,10 +2020,6 @@ void tst_QXmlQuery::fnDocNetworkAccessSuccess() const QVERIFY(buffer.open(QIODevice::WriteOnly)); QXmlSerializer serializer(query, &buffer); - - // these tests with data: URL fail since QUrl change e650dd3b6d8212d2c54ddb4a50558b508d0bf2b9 - QEXPECT_FAIL("data scheme with ASCII", "QTBUG-23953, fails", Abort); - QEXPECT_FAIL("data scheme with ASCII no MIME type", "QTBUG-23953, fails", Abort); QVERIFY(query.evaluateTo(&serializer)); QCOMPARE(result, expectedOutput); @@ -2879,7 +2875,15 @@ void tst_QXmlQuery::useUriResolver() const const QUrl &baseURI) const { Q_UNUSED(relative); - return baseURI.resolved(inputFile(QLatin1String(queriesDirectory) + QLatin1String("simpleDocument.xml"))); + QString fixedInputFile = inputFile(QLatin1String(queriesDirectory) + QLatin1String("simpleDocument.xml")); +#ifdef Q_OS_WIN + // A file path with drive letter is not a valid relative URI, so remove the drive letter. + // Note that can't just use inputFileAsURI() instead of inputFile() as that doesn't + // produce a relative URI either. + if (fixedInputFile.size() > 1 && fixedInputFile.at(1) == QLatin1Char(':')) + fixedInputFile.remove(0, 2); +#endif + return baseURI.resolved(fixedInputFile); } };