Skip to content

Commit

Permalink
rspec
Browse files Browse the repository at this point in the history
  • Loading branch information
opoudjis committed Nov 23, 2024
1 parent 24f12f8 commit d4cc283
Show file tree
Hide file tree
Showing 2 changed files with 201 additions and 4 deletions.
138 changes: 135 additions & 3 deletions spec/isodoc/blocks_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -534,6 +534,11 @@
<stem type="AsciiMath">r = 1 %</stem>
</formula>
</foreword></preface>
<annex id="Annex">
<formula id="AnnexFormula">
<stem type="AsciiMath">r = 1 %</stem>
</formula>
</annex>
</iso-standard>
INPUT
presxml = <<~INPUT
Expand Down Expand Up @@ -592,6 +597,40 @@
<stem type="AsciiMath">r = 1 %</stem>
</formula>
</foreword></preface>
<annex id="Annex" autonum="A" displayorder="3">
<fmt-title>
<span class="fmt-caption-label">
<strong>
<span class="fmt-element-name">Annex</span>
<semx element="autonum" source="Annex">A</semx>
</strong>
<br/>
<span class="fmt-obligation">(informative)</span>
</span>
</fmt-title>
<fmt-xref-label>
<span class="fmt-element-name">Annex</span>
<semx element="autonum" source="Annex">A</semx>
</fmt-xref-label>
<formula id="AnnexFormula" autonum="A.1">
<fmt-name>
<span class="fmt-caption-label">
<span class="fmt-autonum-delim">(</span>
<semx element="autonum" source="Annex">A</semx>
<span class="fmt-autonum-delim">.</span>
<semx element="autonum" source="AnnexFormula">1</semx>
<span class="fmt-autonum-delim">)</span>
</span>
</fmt-name>
<fmt-xref-label>
<span class="fmt-element-name">Formula</span>
<span class="fmt-autonum-delim">(</span>
<semx element="autonum" source="AnnexFormula">A.1</semx>
<span class="fmt-autonum-delim">)</span>
</fmt-xref-label>
<stem type="AsciiMath">r = 1 %</stem>
</formula>
</annex>
</iso-standard>
INPUT
html = <<~OUTPUT
Expand All @@ -613,6 +652,22 @@
<div id="_"><div class="formula"><p><span class="stem">(#(r = 1 %)#)</span>&#160; (1)</p></div></div>
</div>
<br/>
<div id="Annex" class="Section3">
<h1 class="Annex">
<b>Annex A</b>
<br/>
(informative)
</h1>
<div id="AnnexFormula">
<div class="formula">
<p>
<span class="stem">(#(r = 1 %)#)</span>
  (A.1)
</p>
</div>
</div>
</div>
</div>
</body>
</html>
Expand Down Expand Up @@ -686,7 +741,27 @@
<br clear='all' class='section'/>
</p>
<div class='WordSection3'>
</div>
<p class="page-break">
<br clear="all" style="mso-special-character:line-break;page-break-before:always"/>
</p>
<div id="Annex" class="Section3">
<h1 class="Annex">
<b>Annex A</b>
<br/>
(informative)
</h1>
<div id="AnnexFormula">
<div class="formula">
<p>
<span class="stem">(#(r = 1 %)#)</span>
<span style="mso-tab-count:1">  </span>
(A.1)
</p>
</div>
</div>
</div>
</div>
</div>
</body>
</html>
OUTPUT
Expand Down Expand Up @@ -890,6 +965,13 @@
</component>
</permission>
</foreword></preface>
<annex id="Annex">
<permission id="AnnexPermission" model="default">
<description>
<p id="_">As for the measurement targets,</p>
</description>
</permission>
</annex>
<bibliography><references id="_bibliography" obligation="informative" normative="false" displayorder="3">
<title>Bibliography</title>
<bibitem id="rfc2616" type="standard"> <fetched>2020-03-27</fetched> <title format="text/plain" language="en" script="Latn">Hypertext Transfer Protocol — HTTP/1.1</title> <docidentifier type="IETF">RFC 2616</docidentifier> <docidentifier type="IETF" scope="anchor">RFC2616</docidentifier> <docidentifier type="DOI">10.17487/RFC2616</docidentifier> <date type="published"> <on>1999-06</on> </date> <contributor> <role type="author"/> <person> <name> <completename language="en">R. Fielding</completename> </name> <affiliation> <organization> <name>IETF</name> <abbreviation>IETF</abbreviation> </organization> </affiliation> </person> </contributor> <contributor> <role type="author"/> <person> <name> <completename language="en">J. Gettys</completename> </name> <affiliation> <organization> <name>IETF</name> <abbreviation>IETF</abbreviation> </organization> </affiliation> </person> </contributor> <contributor> <role type="author"/> <person> <name> <completename language="en">J. Mogul</completename> </name> <affiliation> <organization> <name>IETF</name> <abbreviation>IETF</abbreviation> </organization> </affiliation> </person> </contributor> <contributor> <role type="author"/> <person> <name> <completename language="en">H. Frystyk</completename> </name> <affiliation> <organization> <name>IETF</name> <abbreviation>IETF</abbreviation> </organization> </affiliation> </person> </contributor> <contributor> <role type="author"/> <person> <name> <completename language="en">L. Masinter</completename> </name> <affiliation> <organization> <name>IETF</name> <abbreviation>IETF</abbreviation> </organization> </affiliation> </person> </contributor> <contributor> <role type="author"/> <person> <name> <completename language="en">P. Leach</completename> </name> <affiliation> <organization> <name>IETF</name> <abbreviation>IETF</abbreviation> </organization> </affiliation> </person> </contributor> <contributor> <role type="author"/> <person> <name> <completename language="en">T. Berners-Lee</completename> </name> <affiliation> <organization> <name>IETF</name> <abbreviation>IETF</abbreviation> </organization> </affiliation> </person> </contributor> <language>en</language> <script>Latn</script> <abstract format="text/plain" language="en" script="Latn">HTTP has been in use by the World-Wide Web global information initiative since 1990. This specification defines the protocol referred to as “HTTP/1.1”, and is an update to RFC 2068. [STANDARDS-TRACK]</abstract> <series type="main"> <title format="text/plain" language="en" script="Latn">RFC</title> <number>2616</number> </series> <place>Fremont, CA</place></bibitem>
Expand Down Expand Up @@ -965,7 +1047,42 @@
<p id="_">Hello</p>
</div></permission>
</foreword></preface>
<bibliography><references id="_" obligation="informative" normative="false" displayorder="3">
<annex id="Annex" autonum="A" displayorder="3">
<fmt-title>
<span class="fmt-caption-label">
<strong>
<span class="fmt-element-name">Annex</span>
<semx element="autonum" source="Annex">A</semx>
</strong>
<br/>
<span class="fmt-obligation">(informative)</span>
</span>
</fmt-title>
<fmt-xref-label>
<span class="fmt-element-name">Annex</span>
<semx element="autonum" source="Annex">A</semx>
</fmt-xref-label>
<permission id="AnnexPermission" model="default" autonum="A.1">
<fmt-name>
<span class="fmt-caption-label">
<span class="fmt-element-name">Permission</span>
<semx element="autonum" source="AnnexPermission">
<semx element="autonum" source="Annex">A</semx>
<span class="fmt-autonum-delim">.</span>
<semx element="autonum" source="AnnexPermission">1</semx>
</semx>
</span>
</fmt-name>
<fmt-xref-label>
<span class="fmt-element-name">Permission</span>
<semx element="autonum" source="AnnexPermission">A.1</semx>
</fmt-xref-label>
<div type="requirement-description">
<p id="_">As for the measurement targets,</p>
</div>
</permission>
</annex>
<bibliography><references id="_" obligation="informative" normative="false" displayorder="4">
<title id="_">Bibliography</title>
<fmt-title depth="1">
<span class="fmt-caption-label">
Expand Down Expand Up @@ -1012,7 +1129,22 @@
<p id="_">The following code will be run for verification:</p>
<pre id="C" class="sourcecode">CoreRoot(success): HttpResponse<br/>&#160;&#160;&#160;&#160;&#160; if (success)<br/>&#160;&#160;&#160;&#160;&#160; recommendation(label: success-response)<br/>&#160;&#160;&#160;&#160;&#160; end<br/>&#160;&#160;&#160; </pre>
</div>
<div class='requirement-component1'> <p id='_'>Hello</p> </div>
<div class='requirement-component1'> <p id='_'>Hello</p>
</div>
</div>
</div>
<br/>
<div id="Annex" class="Section3">
<h1 class="Annex">
<b>Annex A</b>
<br/>
(informative)
</h1>
<div class="permission" id="AnnexPermission">
<p class="RecommendationTitle">Permission A.1</p>
<div class="requirement-description">
<p id="_">As for the measurement targets,</p>
</div>
</div>
</div>
<br/>
Expand Down
67 changes: 66 additions & 1 deletion spec/isodoc/figures_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,12 @@
B</pre>
</figure>
</foreword></preface>
<annex id="Annex">
<figure id="AnnexFigure">
<pre>A &#x3c;
B</pre>
</figure>
</annex>
<bibliography><references id="_normative_references" obligation="informative" normative="true"><title>Normative References</title>
<bibitem id="ISO712" type="standard">
<title format="text/plain">Cereals or cereal products</title>
Expand Down Expand Up @@ -200,6 +206,38 @@
</bibitem>
</references>
</sections>
<annex id="Annex" autonum="A" displayorder="4">
<fmt-title>
<span class="fmt-caption-label">
<strong>
<span class="fmt-element-name">Annex</span>
<semx element="autonum" source="Annex">A</semx>
</strong>
<br/>
<span class="fmt-obligation">(informative)</span>
</span>
</fmt-title>
<fmt-xref-label>
<span class="fmt-element-name">Annex</span>
<semx element="autonum" source="Annex">A</semx>
</fmt-xref-label>
<figure id="AnnexFigure" autonum="A.1">
<fmt-name>
<span class="fmt-caption-label">
<span class="fmt-element-name">Figure</span>
<semx element="autonum" source="Annex">A</semx>
<span class="fmt-autonum-delim">.</span>
<semx element="autonum" source="AnnexFigure">1</semx>
</span>
</fmt-name>
<fmt-xref-label>
<span class="fmt-element-name">Figure</span>
<semx element="autonum" source="AnnexFigure">A.1</semx>
</fmt-xref-label>
<pre>A &lt;
B</pre>
</figure>
</annex>
<bibliography>
</bibliography>
</iso-standard>
Expand Down Expand Up @@ -258,6 +296,19 @@
<h1>1.  Normative References</h1>
<p id="ISO712" class="NormRef">ISO 712, International Organization for Standardization. <i>Cereals and cereal products</i>.</p>
</div>
<br/>
<div id="Annex" class="Section3">
<h1 class="Annex">
<b>Annex A</b>
<br/>
(informative)
</h1>
<div id="AnnexFigure" class="figure">
<pre>A &lt;
B</pre>
<p class="FigureTitle" style="text-align:center;">Figure A.1</p>
</div>
</div>
<aside id="fn:1" class="footnote">
<p>X</p>
</aside>
Expand Down Expand Up @@ -349,10 +400,24 @@
<h1>1.<span style="mso-tab-count:1">  </span>Normative References</h1>
<p id="ISO712" class="NormRef">ISO 712, International Organization for Standardization. <i>Cereals and cereal products</i>.</p>
</div>
<p class="page-break">
<br clear="all" style="mso-special-character:line-break;page-break-before:always"/>
</p>
<div id="Annex" class="Section3">
<h1 class="Annex">
<b>Annex A</b>
<br/>
(informative)
</h1>
<div id="AnnexFigure" class="figure">
<pre>A &lt;
B</pre>
<p class="FigureTitle" style="text-align:center;">Figure A.1</p>
</div>
</div>
<aside id='ftn1'>
<p>X</p>
</aside>
</div>
</body>
</html>
OUTPUT
Expand Down

0 comments on commit d4cc283

Please sign in to comment.