summaryrefslogtreecommitdiff
path: root/tests/auto/xmlpatterns
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@theqtcompany.com>2015-10-08 14:55:44 +0200
committerLiang Qi <liang.qi@theqtcompany.com>2015-10-08 14:55:44 +0200
commit688b29fc5aeab0eafbb457a0fa6953856eeac928 (patch)
tree8093e8a4229b89193297ada0ebfc8ab80d8ab2e0 /tests/auto/xmlpatterns
parent32d682e86a6fff968bc08d4303e31c7a8610ee60 (diff)
parent3338de7bbe76bac44652c525003bc66b14ef16d4 (diff)
downloadqtxmlpatterns-688b29fc5aeab0eafbb457a0fa6953856eeac928.tar.gz
Merge remote-tracking branch 'origin/5.5' into 5.6
Change-Id: I9a379d34bf80344de9b6e9465e6f35fca7fd1a12
Diffstat (limited to 'tests/auto/xmlpatterns')
-rw-r--r--tests/auto/xmlpatterns/queries/literalsequence.xq1
-rw-r--r--tests/auto/xmlpatterns/stderrBaselines/QTBUG35897literalsequence.txt0
-rw-r--r--tests/auto/xmlpatterns/tst_xmlpatterns.cpp15
3 files changed, 12 insertions, 4 deletions
diff --git a/tests/auto/xmlpatterns/queries/literalsequence.xq b/tests/auto/xmlpatterns/queries/literalsequence.xq
new file mode 100644
index 0000000..3420df0
--- /dev/null
+++ b/tests/auto/xmlpatterns/queries/literalsequence.xq
@@ -0,0 +1 @@
+("someString", tokenize("a,b",","))
diff --git a/tests/auto/xmlpatterns/stderrBaselines/QTBUG35897literalsequence.txt b/tests/auto/xmlpatterns/stderrBaselines/QTBUG35897literalsequence.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/auto/xmlpatterns/stderrBaselines/QTBUG35897literalsequence.txt
diff --git a/tests/auto/xmlpatterns/tst_xmlpatterns.cpp b/tests/auto/xmlpatterns/tst_xmlpatterns.cpp
index 90bfbe3..e207a33 100644
--- a/tests/auto/xmlpatterns/tst_xmlpatterns.cpp
+++ b/tests/auto/xmlpatterns/tst_xmlpatterns.cpp
@@ -66,9 +66,7 @@ private Q_SLOTS:
void xquerySupport_data() const;
void xsltSupport();
void xsltSupport_data() const;
-#ifndef QT_NO_PROCESS
void stdoutFailure() const;
-#endif
void cleanupTestCase() const;
private:
@@ -769,6 +767,13 @@ void tst_XmlPatterns::xquerySupport_data() const
<< QString()
<< QString();
+ QTest::newRow("QTBUG-35897: literal sequence")
+ << 0
+ << QByteArray("someString a b\n")
+ << QStringList((path + QStringLiteral("literalsequence.xq")))
+ << QString()
+ << QString();
+
// TODO https?
// TODO pass external variables that allows space around the equal sign.
// TODO run fn:trace()
@@ -815,10 +820,10 @@ void tst_XmlPatterns::removeNonWritable(QFile &outFile)
Check that we gracefully handle writing out to stdout
when the latter is not writable.
*/
-#ifndef QT_NO_PROCESS
void tst_XmlPatterns::stdoutFailure() const
{
return; // TODO It's really hard to write testing code for this.
+#ifndef QT_NO_PROCESS
const QString outName(QLatin1String("stdoutFailure.out"));
createNonWritable(outName);
@@ -840,8 +845,10 @@ void tst_XmlPatterns::stdoutFailure() const
QCOMPARE(process.exitCode(), 1);
removeNonWritable(outFile);
+#else
+ QSKIP("Skipping test due to not having process support");
+#endif // QT_NO_PROCESS
}
-#endif
void tst_XmlPatterns::cleanupTestCase() const
{