diff options
Diffstat (limited to 'tests/auto/xmlpatternsvalidator')
11 files changed, 60 insertions, 0 deletions
diff --git a/tests/auto/xmlpatternsvalidator/files/indirect-datatype.xsd b/tests/auto/xmlpatternsvalidator/files/indirect-datatype.xsd new file mode 100644 index 0000000..60f3e4f --- /dev/null +++ b/tests/auto/xmlpatternsvalidator/files/indirect-datatype.xsd @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="utf-8"?> +<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://qt.nokia.com/test" targetNamespace="http://qt.nokia.com/test"> + <xsd:simpleType name="testType"> + <xsd:list itemType="xsd:int" /> + </xsd:simpleType> +</xsd:schema> diff --git a/tests/auto/xmlpatternsvalidator/files/indirect-import-a.xsd b/tests/auto/xmlpatternsvalidator/files/indirect-import-a.xsd new file mode 100644 index 0000000..e6da433 --- /dev/null +++ b/tests/auto/xmlpatternsvalidator/files/indirect-import-a.xsd @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="utf-8"?> +<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://qt.nokia.com/test" targetNamespace="http://qt.nokia.com/test"> + <xsd:import schemaLocation="indirect-import-b.xsd" namespace="http://qt.nokia.com/test2" /> + <xsd:import schemaLocation="indirect-import-c.xsd" namespace="http://qt.nokia.com/test2" /> +</xsd:schema> diff --git a/tests/auto/xmlpatternsvalidator/files/indirect-import-b.xsd b/tests/auto/xmlpatternsvalidator/files/indirect-import-b.xsd new file mode 100644 index 0000000..88be377 --- /dev/null +++ b/tests/auto/xmlpatternsvalidator/files/indirect-import-b.xsd @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?> +<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://qt.nokia.com/test" targetNamespace="http://qt.nokia.com/test2"> + <xsd:import schemaLocation="indirect-datatype.xsd" namespace="http://qt.nokia.com/test" /> +</xsd:schema> diff --git a/tests/auto/xmlpatternsvalidator/files/indirect-import-c.xsd b/tests/auto/xmlpatternsvalidator/files/indirect-import-c.xsd new file mode 100644 index 0000000..88be377 --- /dev/null +++ b/tests/auto/xmlpatternsvalidator/files/indirect-import-c.xsd @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?> +<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://qt.nokia.com/test" targetNamespace="http://qt.nokia.com/test2"> + <xsd:import schemaLocation="indirect-datatype.xsd" namespace="http://qt.nokia.com/test" /> +</xsd:schema> diff --git a/tests/auto/xmlpatternsvalidator/files/indirect-include-a.xsd b/tests/auto/xmlpatternsvalidator/files/indirect-include-a.xsd new file mode 100644 index 0000000..02ca5c5 --- /dev/null +++ b/tests/auto/xmlpatternsvalidator/files/indirect-include-a.xsd @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="utf-8"?> +<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://qt.nokia.com/test" targetNamespace="http://qt.nokia.com/test"> + <xsd:include schemaLocation="indirect-include-b.xsd" /> + <xsd:include schemaLocation="indirect-include-c.xsd" /> +</xsd:schema> diff --git a/tests/auto/xmlpatternsvalidator/files/indirect-include-b.xsd b/tests/auto/xmlpatternsvalidator/files/indirect-include-b.xsd new file mode 100644 index 0000000..efaba74 --- /dev/null +++ b/tests/auto/xmlpatternsvalidator/files/indirect-include-b.xsd @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?> +<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://qt.nokia.com/test" targetNamespace="http://qt.nokia.com/test"> + <xsd:include schemaLocation="indirect-datatype.xsd" /> +</xsd:schema> diff --git a/tests/auto/xmlpatternsvalidator/files/indirect-include-c.xsd b/tests/auto/xmlpatternsvalidator/files/indirect-include-c.xsd new file mode 100644 index 0000000..efaba74 --- /dev/null +++ b/tests/auto/xmlpatternsvalidator/files/indirect-include-c.xsd @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?> +<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://qt.nokia.com/test" targetNamespace="http://qt.nokia.com/test"> + <xsd:include schemaLocation="indirect-datatype.xsd" /> +</xsd:schema> diff --git a/tests/auto/xmlpatternsvalidator/files/indirect-redefine-a.xsd b/tests/auto/xmlpatternsvalidator/files/indirect-redefine-a.xsd new file mode 100644 index 0000000..4f0804c --- /dev/null +++ b/tests/auto/xmlpatternsvalidator/files/indirect-redefine-a.xsd @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="utf-8"?> +<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://qt.nokia.com/test" targetNamespace="http://qt.nokia.com/test"> + <xsd:redefine schemaLocation="indirect-redefine-b.xsd" /> + <xsd:redefine schemaLocation="indirect-redefine-c.xsd" /> +</xsd:schema> diff --git a/tests/auto/xmlpatternsvalidator/files/indirect-redefine-b.xsd b/tests/auto/xmlpatternsvalidator/files/indirect-redefine-b.xsd new file mode 100644 index 0000000..019a127 --- /dev/null +++ b/tests/auto/xmlpatternsvalidator/files/indirect-redefine-b.xsd @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?> +<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://qt.nokia.com/test" targetNamespace="http://qt.nokia.com/test"> + <xsd:redefine schemaLocation="indirect-datatype.xsd" /> +</xsd:schema> diff --git a/tests/auto/xmlpatternsvalidator/files/indirect-redefine-c.xsd b/tests/auto/xmlpatternsvalidator/files/indirect-redefine-c.xsd new file mode 100644 index 0000000..019a127 --- /dev/null +++ b/tests/auto/xmlpatternsvalidator/files/indirect-redefine-c.xsd @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?> +<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://qt.nokia.com/test" targetNamespace="http://qt.nokia.com/test"> + <xsd:redefine schemaLocation="indirect-datatype.xsd" /> +</xsd:schema> diff --git a/tests/auto/xmlpatternsvalidator/tst_xmlpatternsvalidator.cpp b/tests/auto/xmlpatternsvalidator/tst_xmlpatternsvalidator.cpp index 6d4ed69..7aab47f 100644 --- a/tests/auto/xmlpatternsvalidator/tst_xmlpatternsvalidator.cpp +++ b/tests/auto/xmlpatternsvalidator/tst_xmlpatternsvalidator.cpp @@ -196,6 +196,21 @@ void tst_XmlPatternsValidator::xsdSupport_data() const << 1 << (QStringList() << QLatin1String("files/instance.xml")) << QString(); + + QTest::newRow("A schema with an indirectly included type") + << 0 + << (QStringList() << QLatin1String("files/indirect-include-a.xsd")) + << QString(); + + QTest::newRow("A schema with an indirectly imported type") + << 0 + << (QStringList() << QLatin1String("files/indirect-import-a.xsd")) + << QString(); + + QTest::newRow("A schema with an indirectly redefined type") + << 0 + << (QStringList() << QLatin1String("files/indirect-redefine-a.xsd")) + << QString(); } QTEST_MAIN(tst_XmlPatternsValidator) |