Add test case for recursive external parsed entities

This commit is contained in:
Nick Wellnhofer 2020-02-11 13:16:10 +01:00
parent f20daa9e51
commit 32cb5dccda
6 changed files with 253 additions and 0 deletions

View File

@ -0,0 +1,5 @@
<?xml version="1.0"?>
<!DOCTYPE doc [
<!ENTITY e SYSTEM "rec_ext.ent">
]>
<doc>&e; &e; &e; &e;</doc>

View File

@ -0,0 +1,243 @@
test/errors/rec_ext.ent:1: parser error : Detected an entity reference loop
<ent>&e; &e; &e; &e;</ent>
^
test/errors/rec_ext.ent:2: parser error : chunk is not well balanced
^
test/errors/rec_ext.ent:1: parser error : Entity 'e' failed to parse
<ent>&e; &e; &e; &e;</ent>
^
test/errors/rec_ext.ent:2: parser error : chunk is not well balanced
^
test/errors/rec_ext.ent:1: parser error : Entity 'e' failed to parse
<ent>&e; &e; &e; &e;</ent>
^
test/errors/rec_ext.ent:2: parser error : chunk is not well balanced
^
test/errors/rec_ext.ent:1: parser error : Entity 'e' failed to parse
<ent>&e; &e; &e; &e;</ent>
^
test/errors/rec_ext.ent:2: parser error : chunk is not well balanced
^
test/errors/rec_ext.ent:1: parser error : Entity 'e' failed to parse
<ent>&e; &e; &e; &e;</ent>
^
test/errors/rec_ext.ent:2: parser error : chunk is not well balanced
^
test/errors/rec_ext.ent:1: parser error : Entity 'e' failed to parse
<ent>&e; &e; &e; &e;</ent>
^
test/errors/rec_ext.ent:2: parser error : chunk is not well balanced
^
test/errors/rec_ext.ent:1: parser error : Entity 'e' failed to parse
<ent>&e; &e; &e; &e;</ent>
^
test/errors/rec_ext.ent:2: parser error : chunk is not well balanced
^
test/errors/rec_ext.ent:1: parser error : Entity 'e' failed to parse
<ent>&e; &e; &e; &e;</ent>
^
test/errors/rec_ext.ent:2: parser error : chunk is not well balanced
^
test/errors/rec_ext.ent:1: parser error : Entity 'e' failed to parse
<ent>&e; &e; &e; &e;</ent>
^
test/errors/rec_ext.ent:2: parser error : chunk is not well balanced
^
test/errors/rec_ext.ent:1: parser error : Entity 'e' failed to parse
<ent>&e; &e; &e; &e;</ent>
^
test/errors/rec_ext.ent:2: parser error : chunk is not well balanced
^
test/errors/rec_ext.ent:1: parser error : Entity 'e' failed to parse
<ent>&e; &e; &e; &e;</ent>
^
test/errors/rec_ext.ent:2: parser error : chunk is not well balanced
^
test/errors/rec_ext.ent:1: parser error : Entity 'e' failed to parse
<ent>&e; &e; &e; &e;</ent>
^
test/errors/rec_ext.ent:2: parser error : chunk is not well balanced
^
test/errors/rec_ext.ent:1: parser error : Entity 'e' failed to parse
<ent>&e; &e; &e; &e;</ent>
^
test/errors/rec_ext.ent:2: parser error : chunk is not well balanced
^
test/errors/rec_ext.ent:1: parser error : Entity 'e' failed to parse
<ent>&e; &e; &e; &e;</ent>
^
test/errors/rec_ext.ent:2: parser error : chunk is not well balanced
^
test/errors/rec_ext.ent:1: parser error : Entity 'e' failed to parse
<ent>&e; &e; &e; &e;</ent>
^
test/errors/rec_ext.ent:2: parser error : chunk is not well balanced
^
test/errors/rec_ext.ent:1: parser error : Entity 'e' failed to parse
<ent>&e; &e; &e; &e;</ent>
^
test/errors/rec_ext.ent:2: parser error : chunk is not well balanced
^
test/errors/rec_ext.ent:1: parser error : Entity 'e' failed to parse
<ent>&e; &e; &e; &e;</ent>
^
test/errors/rec_ext.ent:2: parser error : chunk is not well balanced
^
test/errors/rec_ext.ent:1: parser error : Entity 'e' failed to parse
<ent>&e; &e; &e; &e;</ent>
^
test/errors/rec_ext.ent:2: parser error : chunk is not well balanced
^
test/errors/rec_ext.ent:1: parser error : Entity 'e' failed to parse
<ent>&e; &e; &e; &e;</ent>
^
test/errors/rec_ext.ent:2: parser error : chunk is not well balanced
^
test/errors/rec_ext.ent:1: parser error : Entity 'e' failed to parse
<ent>&e; &e; &e; &e;</ent>
^
test/errors/rec_ext.ent:2: parser error : chunk is not well balanced
^
test/errors/rec_ext.ent:1: parser error : Entity 'e' failed to parse
<ent>&e; &e; &e; &e;</ent>
^
test/errors/rec_ext.ent:2: parser error : chunk is not well balanced
^
test/errors/rec_ext.ent:1: parser error : Entity 'e' failed to parse
<ent>&e; &e; &e; &e;</ent>
^
test/errors/rec_ext.ent:2: parser error : chunk is not well balanced
^
test/errors/rec_ext.ent:1: parser error : Entity 'e' failed to parse
<ent>&e; &e; &e; &e;</ent>
^
test/errors/rec_ext.ent:2: parser error : chunk is not well balanced
^
test/errors/rec_ext.ent:1: parser error : Entity 'e' failed to parse
<ent>&e; &e; &e; &e;</ent>
^
test/errors/rec_ext.ent:2: parser error : chunk is not well balanced
^
test/errors/rec_ext.ent:1: parser error : Entity 'e' failed to parse
<ent>&e; &e; &e; &e;</ent>
^
test/errors/rec_ext.ent:2: parser error : chunk is not well balanced
^
test/errors/rec_ext.ent:1: parser error : Entity 'e' failed to parse
<ent>&e; &e; &e; &e;</ent>
^
test/errors/rec_ext.ent:2: parser error : chunk is not well balanced
^
test/errors/rec_ext.ent:1: parser error : Entity 'e' failed to parse
<ent>&e; &e; &e; &e;</ent>
^
test/errors/rec_ext.ent:2: parser error : chunk is not well balanced
^
test/errors/rec_ext.ent:1: parser error : Entity 'e' failed to parse
<ent>&e; &e; &e; &e;</ent>
^
test/errors/rec_ext.ent:2: parser error : chunk is not well balanced
^
test/errors/rec_ext.ent:1: parser error : Entity 'e' failed to parse
<ent>&e; &e; &e; &e;</ent>
^
test/errors/rec_ext.ent:2: parser error : chunk is not well balanced
^
test/errors/rec_ext.ent:1: parser error : Detected an entity reference loop
<ent>&e; &e; &e; &e;</ent>
^
test/errors/rec_ext.ent:2: parser error : chunk is not well balanced
^
test/errors/rec_ext.ent:1: parser error : Detected an entity reference loop
<ent>&e; &e; &e; &e;</ent>
^
test/errors/rec_ext.ent:2: parser error : chunk is not well balanced
^
test/errors/rec_ext.ent:1: parser error : Detected an entity reference loop
<ent>&e; &e; &e; &e;</ent>
^
test/errors/rec_ext.ent:2: parser error : chunk is not well balanced
^
test/errors/rec_ext.ent:1: parser error : Detected an entity reference loop
<ent>&e; &e; &e; &e;</ent>
^
test/errors/rec_ext.ent:2: parser error : chunk is not well balanced
^
test/errors/rec_ext.ent:1: parser error : Detected an entity reference loop
<ent>&e; &e; &e; &e;</ent>
^
test/errors/rec_ext.ent:2: parser error : chunk is not well balanced
^
test/errors/rec_ext.ent:1: parser error : Detected an entity reference loop
<ent>&e; &e; &e; &e;</ent>
^
test/errors/rec_ext.ent:2: parser error : chunk is not well balanced
^
test/errors/rec_ext.ent:1: parser error : Detected an entity reference loop
<ent>&e; &e; &e; &e;</ent>
^
test/errors/rec_ext.ent:2: parser error : chunk is not well balanced
^
test/errors/rec_ext.ent:1: parser error : Detected an entity reference loop
<ent>&e; &e; &e; &e;</ent>
^
test/errors/rec_ext.ent:2: parser error : chunk is not well balanced
^
test/errors/rec_ext.ent:1: parser error : Detected an entity reference loop
<ent>&e; &e; &e; &e;</ent>
^
test/errors/rec_ext.ent:2: parser error : chunk is not well balanced
^
test/errors/rec_ext.ent:1: parser error : Detected an entity reference loop
<ent>&e; &e; &e; &e;</ent>
^
test/errors/rec_ext.ent:2: parser error : chunk is not well balanced
^
test/errors/rec_ext.ent:1: parser error : Detected an entity reference loop
<ent>&e; &e; &e; &e;</ent>
^
test/errors/rec_ext.ent:2: parser error : chunk is not well balanced
^
./test/errors/rec_ext_ent.xml:4: parser error : Entity 'e' failed to parse
<doc>&e; &e; &e; &e;</doc>
^

View File

View File

1
test/errors/rec_ext.ent Normal file
View File

@ -0,0 +1 @@
<ent>&e; &e; &e; &e;</ent>

View File

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