summaryrefslogtreecommitdiff
path: root/tests/auto/xmlpatterns
diff options
context:
space:
mode:
authorDavid E. Narvaez <david.narvaez@computer.org>2015-06-21 22:24:39 -0400
committerErik Verbruggen <erik.verbruggen@theqtcompany.com>2015-07-29 07:51:22 +0000
commitd17eba9d34f412e592c3b049c6c14fd9ccada87b (patch)
tree32f16a5ae2272b7d5dfa6c25b53b8aa06cf98330 /tests/auto/xmlpatterns
parent69c539045191d02a07ff3471bd37486ccf226b18 (diff)
downloadqtxmlpatterns-d17eba9d34f412e592c3b049c6c14fd9ccada87b.tar.gz
Iterate Over the Items (Not the Operands) of a Literal Sequence
The current code iterates over the (empty) list of operands of a Literal Sequence, ignoring any items in it, so Literal Sequences are always ignored in the ExpressionSequence. Task-number: QTBUG-35897 Change-Id: I60341ac21c8e3b77bf6d8dfeebdbafe010844406 Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
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.cpp7
3 files changed, 8 insertions, 0 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 85dc50a..ffb1697 100644
--- a/tests/auto/xmlpatterns/tst_xmlpatterns.cpp
+++ b/tests/auto/xmlpatterns/tst_xmlpatterns.cpp
@@ -757,6 +757,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()