QXmlStreamReader: update test distribution

As mentioned in the linked bugreport, we are not allowed to distribute
the uncompressed files from one of the XML test datasets that we use
in our tests.
This patch removes the uncompressed version, and replaces it by the
xmltest.zip archive taken from [0].
Once the test is started, QZipReader is used to uncompress the archive,
and once the test is done, the uncompressed data is removed.

However the test data from [0] is very old, so it is slightly different
from what we had previously (the previous data was taken from w3c).
As a result, 4 test cases are failing with this data. To fix it, we
store the updated versions of 4 xml files separately, and replace them
after uncompressing the archive.

[0]: http://www.jclark.com/xml/

Fixes: QTBUG-81503
Pick-to: 6.3 6.2 5.15
Change-Id: Ied5233970a529deebca56b1eab07fe1c328a2ee0
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
This commit is contained in:
Ivan Solovev 2021-12-15 18:20:01 +01:00
parent 5cc7510801
commit f8b74a4957
653 changed files with 27 additions and 3918 deletions

View File

@ -11,8 +11,9 @@ list(APPEND test_data "XML-Test-Suite")
qt_internal_add_test(tst_qxmlstream
SOURCES
tst_qxmlstream.cpp
PUBLIC_LIBRARIES
LIBRARIES
Qt::Network
Qt::Xml
Qt::GuiPrivate
TESTDATA ${test_data}
)

View File

@ -1,6 +0,0 @@
/canonxml.html/1.1.1.1/Wed Oct 17 09:52:58 2001//
/readme.html/1.1.1.1/Wed Oct 17 09:52:58 2001//
/xmltest.xml/1.11/Wed Apr 13 19:30:48 2005//
D/invalid////
D/not-wf////
D/valid////

View File

@ -1 +0,0 @@
2001/XML-Test-Suite/xmlconf/xmltest

View File

@ -1 +0,0 @@
:pserver:anonymous@dev.w3.org:/sources/public

View File

@ -1,44 +0,0 @@
<HTML>
<TITLE>Canonical XML</TITLE>
<BODY>
<H1>Canonical XML</H1>
<P>
This document defines a subset of XML called canonical XML.
The intended use of canonical XML is in testing XML processors,
as a representation of the result of parsing an XML document.
<P>
Every well-formed XML document has a unique structurally equivalent
canonical XML document. Two structurally equivalent XML
documents have a byte-for-byte identical canonical XML document.
Canonicalizing an XML document requires only information that an XML
processor is required to make available to an application.
<P>
A canonical XML document conforms to the following grammar:
<PRE>
CanonXML ::= Pi* element Pi*
element ::= Stag (Datachar | Pi | element)* Etag
Stag ::= '&lt;' Name Atts '&gt;'
Etag ::= '&lt;/' Name '&gt;'
Pi ::= '&lt;?' Name ' ' (((Char - S) Char*)? - (Char* '?&gt;' Char*)) '?&gt;'
Atts ::= (' ' Name '=' '"' Datachar* '"')*
Datachar ::= '&amp;amp;' | '&amp;lt;' | '&amp;gt;' | '&amp;quot;'
| '&amp;#9;'| '&amp;#10;'| '&amp;#13;'
| (Char - ('&amp;' | '&lt;' | '&gt;' | '"' | #x9 | #xA | #xD))
Name ::= (see XML spec)
Char ::= (see XML spec)
S ::= (see XML spec)
</PRE>
<P>
Attributes are in lexicographical order (in Unicode bit order).
<P>
A canonical XML document is encoded in UTF-8.
<P>
Ignorable white space is considered significant and is treated equivalently
to data.
<P>
<ADDRESS>
<A HREF="mailto:jjc@jclark.com">James Clark</A>
</ADDRESS>
</BODY>
</HTML>

View File

@ -1,2 +0,0 @@
<!ENTITY % e "(#PCDATA">
<!ELEMENT doc %e;)>

View File

@ -1,2 +0,0 @@
<!DOCTYPE doc SYSTEM "002.ent">
<doc></doc>

View File

@ -1,2 +0,0 @@
<!ENTITY % e ">">
<!ELEMENT doc (#PCDATA) %e;

View File

@ -1,2 +0,0 @@
<!DOCTYPE doc SYSTEM "005.ent">
<doc></doc>

View File

@ -1,2 +0,0 @@
<!ENTITY % e "(#PCDATA)>">
<!ELEMENT doc %e;

View File

@ -1,2 +0,0 @@
<!DOCTYPE doc SYSTEM "006.ent">
<doc></doc>

View File

@ -1,7 +0,0 @@
/002.ent/1.1.1.1/Wed Oct 17 09:52:58 2001//
/002.xml/1.1.1.1/Wed Oct 17 09:52:58 2001//
/005.ent/1.1.1.1/Wed Oct 17 09:52:58 2001//
/005.xml/1.1.1.1/Wed Oct 17 09:52:58 2001//
/006.ent/1.1.1.1/Wed Oct 17 09:52:58 2001//
/006.xml/1.1.1.1/Wed Oct 17 09:52:58 2001//
D/not-sa////

View File

@ -1 +0,0 @@
2001/XML-Test-Suite/xmlconf/xmltest/invalid

View File

@ -1 +0,0 @@
:pserver:anonymous@dev.w3.org:/sources/public

View File

@ -1,3 +0,0 @@
<!ENTITY % e "INCLUDE[">
<!ELEMENT doc (#PCDATA)>
<![ %e; <!ATTLIST doc a1 CDATA "v1"> ]]>

View File

@ -1,2 +0,0 @@
<!DOCTYPE doc SYSTEM "022.ent">
<doc></doc>

View File

@ -1,3 +0,0 @@
/022.ent/1.1/Tue Feb 26 18:02:12 2002//
/022.xml/1.1/Tue Feb 26 18:02:12 2002//
D/out////

View File

@ -1 +0,0 @@
2001/XML-Test-Suite/xmlconf/xmltest/invalid/not-sa

View File

@ -1 +0,0 @@
:pserver:anonymous@dev.w3.org:/sources/public

View File

@ -1,2 +0,0 @@
/022.xml/1.1/Tue Feb 26 18:03:20 2002//
D

View File

@ -1 +0,0 @@
2001/XML-Test-Suite/xmlconf/xmltest/invalid/not-sa/out

View File

@ -1 +0,0 @@
:pserver:anonymous@dev.w3.org:/sources/public

View File

@ -1,3 +0,0 @@
A D/ext-sa////
A D/not-sa////
A D/sa////

View File

@ -1 +0,0 @@
2001/XML-Test-Suite/xmlconf/xmltest/not-wf

View File

@ -1 +0,0 @@
:pserver:anonymous@dev.w3.org:/sources/public

View File

@ -1,4 +0,0 @@
<!DOCTYPE doc [
<!ENTITY e SYSTEM "001.ent">
]>
<doc>&e;</doc>

View File

@ -1,3 +0,0 @@
<?xml version="1.0" standalone="yes"?>
data

View File

@ -1,5 +0,0 @@
<!DOCTYPE doc [
<!ELEMENT doc (#PCDATA)>
<!ENTITY e SYSTEM "002.ent">
]>
<doc>&e;</doc>

View File

@ -1,2 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?><?xml version="1.0" encoding="UTF-8"?>
data

View File

@ -1,5 +0,0 @@
<!DOCTYPE doc [
<!ELEMENT doc (#PCDATA)>
<!ENTITY e SYSTEM "003.ent">
]>
<doc>&e;</doc>

View File

@ -1,7 +0,0 @@
/001.ent/1.1.1.1/Wed Oct 17 09:52:58 2001//
/001.xml/1.1.1.1/Wed Oct 17 09:52:58 2001//
/002.ent/1.1.1.1/Wed Oct 17 09:52:58 2001//
/002.xml/1.1.1.1/Wed Oct 17 09:52:58 2001//
/003.ent/1.2/Fri Feb 22 18:52:54 2002//
/003.xml/1.1.1.1/Wed Oct 17 09:52:58 2001//
D

View File

@ -1 +0,0 @@
2001/XML-Test-Suite/xmlconf/xmltest/not-wf/ext-sa

View File

@ -1 +0,0 @@
:pserver:anonymous@dev.w3.org:/sources/public

View File

@ -1,3 +0,0 @@
<![ INCLUDE [
<!ELEMENT doc (#PCDATA)>
]>

View File

@ -1,2 +0,0 @@
<!DOCTYPE doc SYSTEM "001.ent">
<doc></doc>

View File

@ -1,6 +0,0 @@
<!DOCTYPE doc [
<!ELEMENT doc (#PCDATA)>
<!ENTITY % e "<?xml version='1.0' encoding='UTF-8'?>">
%e;
]>
<doc></doc>

View File

@ -1,2 +0,0 @@
<!ELEMENT doc (#PCDATA)>
<![ IGNORE [

View File

@ -1,2 +0,0 @@
<!DOCTYPE doc SYSTEM "003.ent">
<doc></doc>

View File

@ -1,2 +0,0 @@
<!ELEMENT doc (#PCDATA)>
<![ INCLUDE [

View File

@ -1,2 +0,0 @@
<!DOCTYPE doc SYSTEM "004.ent">
<doc></doc>

View File

@ -1,2 +0,0 @@
<!DOCTYPE doc SYSTEM "005.ent">
<doc></doc>

View File

@ -1,3 +0,0 @@
<![INCLUDE
<!ELEMENT doc (#PCDATA)>
]]>

View File

@ -1,2 +0,0 @@
<!DOCTYPE doc SYSTEM "006.ent">
<doc></doc>

View File

@ -1,3 +0,0 @@
<!DOCTYPE doc [
<!ELEMENT doc (#PCDATA)>
]>

View File

@ -1,2 +0,0 @@
<!DOCTYPE doc SYSTEM "007.ent">
<doc></doc>

View File

@ -1,2 +0,0 @@
<!ELEMENT doc ANY>
<!ENTITY e "100%">

View File

@ -1,2 +0,0 @@
<!DOCTYPE doc SYSTEM "008.ent">
<doc></doc>

View File

@ -1,3 +0,0 @@
<!ELEMENT doc EMPTY>
<!ENTITY % e "<!--">
%e; -->

View File

@ -1,2 +0,0 @@
<!DOCTYPE doc SYSTEM "009.ent">
<doc></doc>

View File

@ -1,2 +0,0 @@
<!ENTITY % e "<!ELEMENT ">
%e; doc (#PCDATA)>

View File

@ -1,2 +0,0 @@
<!DOCTYPE doc SYSTEM "010.ent">
<doc></doc>

View File

@ -1,3 +0,0 @@
<!ENTITY % e1 "<!ELEMENT ">
<!ENTITY % e2 ">">
%e1; doc (#PCDATA) %e2;

View File

@ -1,2 +0,0 @@
<!DOCTYPE doc SYSTEM "011.ent">
<doc></doc>

View File

@ -1,22 +0,0 @@
/001.ent/1.1.1.1/Wed Oct 17 09:52:58 2001//
/001.xml/1.1.1.1/Wed Oct 17 09:52:58 2001//
/002.xml/1.1.1.1/Wed Oct 17 09:52:58 2001//
/003.ent/1.1.1.1/Wed Oct 17 09:52:58 2001//
/003.xml/1.1.1.1/Wed Oct 17 09:52:58 2001//
/004.ent/1.1.1.1/Wed Oct 17 09:52:58 2001//
/004.xml/1.1.1.1/Wed Oct 17 09:52:58 2001//
/005.ent/1.1.1.1/Wed Oct 17 09:52:58 2001//
/005.xml/1.1.1.1/Wed Oct 17 09:52:58 2001//
/006.ent/1.1.1.1/Wed Oct 17 09:52:58 2001//
/006.xml/1.1.1.1/Wed Oct 17 09:52:58 2001//
/007.ent/1.1.1.1/Wed Oct 17 09:52:58 2001//
/007.xml/1.1.1.1/Wed Oct 17 09:52:58 2001//
/008.ent/1.1.1.1/Wed Oct 17 09:52:58 2001//
/008.xml/1.1.1.1/Wed Oct 17 09:52:58 2001//
/009.ent/1.1/Mon Mar 25 18:59:43 2002//
/009.xml/1.1/Mon Mar 25 18:59:17 2002//
/010.ent/1.1/Mon Mar 25 18:34:47 2002//
/010.xml/1.1/Mon Mar 25 18:33:57 2002//
/011.ent/1.1/Mon Mar 25 19:08:52 2002//
/011.xml/1.1/Mon Mar 25 19:08:40 2002//
D

View File

@ -1 +0,0 @@
2001/XML-Test-Suite/xmlconf/xmltest/not-wf/not-sa

View File

@ -1 +0,0 @@
:pserver:anonymous@dev.w3.org:/sources/public

View File

@ -1 +0,0 @@
<doc><!-- a comment -- another --></doc>

View File

@ -1,4 +0,0 @@
<doc>
<?a pi that is not closed
</doc>

View File

@ -1 +0,0 @@
<doc>A form feed ( ) is not legal in data</doc>

View File

@ -1 +0,0 @@
<doc><?pi a form feed ( ) is not allowed in a pi?></doc>

View File

@ -1 +0,0 @@
<doc><!-- a form feed ( ) is not allowed in a comment --></doc>

View File

@ -1 +0,0 @@
<doc >A form-feed is not white space or a name character</doc >

View File

@ -1 +0,0 @@
<doc x="foo" y="bar" x="baz"></doc>

Some files were not shown because too many files have changed in this diff Show More