Skip to content

Commit

Permalink
test: Add RFC 10k test
Browse files Browse the repository at this point in the history
  • Loading branch information
kesara committed Oct 22, 2024
1 parent 4cd23e8 commit 3899d82
Show file tree
Hide file tree
Showing 12 changed files with 4,168 additions and 2 deletions.
3 changes: 1 addition & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@ libversion_regex = \(pyflakes\|PyYAML\|requests\|setuptools\|six\|Weasyprint\) [

rfcxml= \
rfc7911.xml \
# rfc6787.xml \
# rfc7754.edited.xml \
rfc99999.xml \

rfcxmlfiles = $(addprefix tests/input/, $(rfcxml))
rfctxt = $(addsuffix .txt, $(basename $(rfcxml)))
Expand Down
52 changes: 52 additions & 0 deletions tests/input/rfc99999.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE rfc [
<!ENTITY nbsp "&#160;">
<!ENTITY zwsp "&#8203;">
<!ENTITY nbhy "&#8209;">
<!ENTITY wj "&#8288;">
]>
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" docName="draft-doe-fake-00" number="99999" submissionType="IETF" category="bcp" consensus="true" ipr="trust200902" obsoletes="" updates="" xml:lang="en" tocInclude="true" tocDepth="4" symRefs="true" sortRefs="true" version="3">
<front>
<title abbrev="Fake RFC">Fake RFC</title>
<seriesInfo name="RFC" value="99999"/>
<author initials="J." surname="Doe" fullname="Jane Doe">
<address>
<postal>
<country>NZ</country>
</postal>
<email>[email protected]</email>
</address>
</author>
<date year="2024" month="October"/>
<area>General</area>
<abstract>
<t>This is not a real RFC.</t>
</abstract>
</front>
<middle>
<section numbered="true" toc="default">
<name>Section 31</name>
<t>redacted <xref target="RFC99998"/></t>
</section>
</middle>
<back>
<references>
<name>References</name>
<references>
<name>Normative References</name>
<reference anchor="RFC99998" target="https://www.rfc-editor.org/info/rfc99998">
<front>
<title>Prime Directive</title>
<author fullname="J. Doe" initials="J." surname="Doe"/>
<date month="October" year="2024"/>
<abstract>
<t>Fake reference</t>
</abstract>
</front>
<seriesInfo name="RFC" value="99998"/>
<seriesInfo name="DOI" value="10.17487/RFC99998"/>
</reference>
</references>
</references>
</back>
</rfc>
47 changes: 47 additions & 0 deletions tests/valid/rfc99999.exp.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE rfc SYSTEM "rfc2629-xhtml.ent">
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" docName="draft-doe-fake-00" number="99999" submissionType="IETF" category="bcp" consensus="true" ipr="trust200902" obsoletes="" updates="" xml:lang="en" tocInclude="true" tocDepth="4" symRefs="true" sortRefs="true" version="3">
<front>
<title abbrev="Fake RFC">Fake RFC</title>
<seriesInfo name="RFC" value="99999"/>
<author initials="J." surname="Doe" fullname="Jane Doe">
<address>
<postal>
<country>NZ</country>
</postal>
<email>[email protected]</email>
</address>
</author>
<date year="2024" month="October"/>
<area>General</area>
<abstract>
<t>This is not a real RFC.</t>
</abstract>
</front>
<middle>
<section numbered="true" toc="default">
<name>Section 31</name>
<t>redacted <xref target="RFC99998"/></t>
</section>
</middle>
<back>
<references>
<name>References</name>
<references>
<name>Normative References</name>
<reference anchor="RFC99998" target="https://www.rfc-editor.org/info/rfc99998">
<front>
<title>Prime Directive</title>
<author fullname="J. Doe" initials="J." surname="Doe"/>
<date month="October" year="2024"/>
<abstract>
<t>Fake reference</t>
</abstract>
</front>
<seriesInfo name="RFC" value="99998"/>
<seriesInfo name="DOI" value="10.17487/RFC99998"/>
</reference>
</references>
</references>
</back>
</rfc>
Loading

0 comments on commit 3899d82

Please sign in to comment.