summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-08-06 01:30:58 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-08-06 01:30:58 (GMT)
commitf4bb08bc61df49b9e28bb365ea2aa10e056a2862 (patch)
tree5b725a4581b29c9661de7267c1a272494c4fd2f4 /tests
parenta8ff8e81f7b120e1ecdd434093be075cdd92fb24 (diff)
parentbbd444559359df3e211fedb28d40b175af778030 (diff)
downloadQt-f4bb08bc61df49b9e28bb365ea2aa10e056a2862.zip
Qt-f4bb08bc61df49b9e28bb365ea2aa10e056a2862.tar.gz
Qt-f4bb08bc61df49b9e28bb365ea2aa10e056a2862.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1: Update def files for d524da81ee257a6bd67d32d0bc870280a7d5b8a4. Remove useless QString::clear() from QSharedData example snippet. Move note on connectToBus() not actually being able to reconnect to Designer: Prevent rich text from being copied into style sheets. QXmlPatterns QAbstractDateTime: only parse 3 digits of time fraction qdoc: Removed three unused config variables. qdoc: Cleaned up the application option specification and use. Doc: Adding GS QML example files Doc: Images for QML GS Doc: Editied version of QML GS Doc: Adding text to GS page Fix link error when building Bearer application with Qt Mobility Doc: nesting up orphant pages
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/xmlpatternsvalidator/files/dateTime-with-microseconds.xml1
-rw-r--r--tests/auto/xmlpatternsvalidator/files/dateTime-with-microseconds.xsd12
-rw-r--r--tests/auto/xmlpatternsvalidator/tst_xmlpatternsvalidator.cpp6
3 files changed, 19 insertions, 0 deletions
diff --git a/tests/auto/xmlpatternsvalidator/files/dateTime-with-microseconds.xml b/tests/auto/xmlpatternsvalidator/files/dateTime-with-microseconds.xml
new file mode 100644
index 0000000..b17739a
--- /dev/null
+++ b/tests/auto/xmlpatternsvalidator/files/dateTime-with-microseconds.xml
@@ -0,0 +1 @@
+<date>2009-12-16T23:14:10.823218Z</date>
diff --git a/tests/auto/xmlpatternsvalidator/files/dateTime-with-microseconds.xsd b/tests/auto/xmlpatternsvalidator/files/dateTime-with-microseconds.xsd
new file mode 100644
index 0000000..55557f1
--- /dev/null
+++ b/tests/auto/xmlpatternsvalidator/files/dateTime-with-microseconds.xsd
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+
+ <xsd:element name="date" type="xsd:dateTime"/>
+
+ <xsd:simpleType name="microsecondsType">
+ <xsd:restriction base="xsd:dateTime">
+ <xsd:pattern value="\d\d\d\d-\d\d-\d\dT\d\d:\d\d:\d\d\.\d\d\d\d\d\dZ"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+
+</xsd:schema>
diff --git a/tests/auto/xmlpatternsvalidator/tst_xmlpatternsvalidator.cpp b/tests/auto/xmlpatternsvalidator/tst_xmlpatternsvalidator.cpp
index 3517b5a..092e966 100644
--- a/tests/auto/xmlpatternsvalidator/tst_xmlpatternsvalidator.cpp
+++ b/tests/auto/xmlpatternsvalidator/tst_xmlpatternsvalidator.cpp
@@ -216,6 +216,12 @@ void tst_XmlPatternsValidator::xsdSupport_data() const
<< 0
<< (QStringList() << QLatin1String("files/complex-type-including-anonymous-type.xsd"))
<< QString();
+
+ QTest::newRow("QTBUG-11559 A schema and instance with a dateTime containing microseconds")
+ << 0
+ << (QStringList() << QLatin1String("files/dateTime-with-microseconds.xml")
+ << QLatin1String("files/dateTime-with-microseconds.xsd"))
+ << QString();
}
QTEST_MAIN(tst_XmlPatternsValidator)