asciidoctor-rfc 0.1.0 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (130) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +5 -0
  3. data/.oss-guides.rubocop.yml +1077 -0
  4. data/.rspec +1 -0
  5. data/.rubocop.yml +19 -1063
  6. data/.travis.yml +3 -2
  7. data/Guardfile +22 -0
  8. data/README.adoc +1151 -0
  9. data/Rakefile +1 -1
  10. data/asciidoctor-rfc.gemspec +20 -3
  11. data/bin/asciidoctor-rfc2 +15 -0
  12. data/bin/asciidoctor-rfc3 +15 -0
  13. data/bin/rspec +0 -1
  14. data/lib/asciidoctor-rfc.rb +4 -0
  15. data/lib/asciidoctor/rfc/common/base.rb +218 -0
  16. data/lib/asciidoctor/rfc/common/front.rb +120 -0
  17. data/lib/asciidoctor/rfc/v2/base.rb +341 -0
  18. data/lib/asciidoctor/rfc/v2/blocks.rb +192 -0
  19. data/lib/asciidoctor/rfc/v2/converter.rb +64 -0
  20. data/lib/asciidoctor/rfc/v2/front.rb +69 -0
  21. data/lib/asciidoctor/rfc/v2/inline_anchor.rb +102 -0
  22. data/lib/asciidoctor/rfc/v2/lists.rb +134 -0
  23. data/lib/asciidoctor/rfc/v2/table.rb +112 -0
  24. data/lib/asciidoctor/rfc/v2/validate.rb +738 -0
  25. data/lib/asciidoctor/rfc/v2/validate2.rng +716 -0
  26. data/lib/asciidoctor/rfc/v3/base.rb +358 -0
  27. data/lib/asciidoctor/rfc/v3/blocks.rb +203 -0
  28. data/lib/asciidoctor/rfc/v3/converter.rb +64 -0
  29. data/lib/asciidoctor/rfc/v3/front.rb +115 -0
  30. data/lib/asciidoctor/rfc/v3/inline_anchor.rb +90 -0
  31. data/lib/asciidoctor/rfc/v3/lists.rb +190 -0
  32. data/lib/asciidoctor/rfc/v3/svg.rng +9081 -0
  33. data/lib/asciidoctor/rfc/v3/table.rb +65 -0
  34. data/lib/asciidoctor/rfc/v3/validate.rb +2168 -0
  35. data/lib/asciidoctor/rfc/v3/validate.rng +2143 -0
  36. data/lib/asciidoctor/rfc/version.rb +2 -2
  37. data/spec/asciidoctor/rfc/v2/appendix_spec.rb +124 -0
  38. data/spec/asciidoctor/rfc/v2/area_spec.rb +60 -0
  39. data/spec/asciidoctor/rfc/v2/author_spec.rb +444 -0
  40. data/spec/asciidoctor/rfc/v2/comments_spec.rb +316 -0
  41. data/spec/asciidoctor/rfc/v2/crossref_spec.rb +205 -0
  42. data/spec/asciidoctor/rfc/v2/date_spec.rb +166 -0
  43. data/spec/asciidoctor/rfc/v2/dlist_spec.rb +108 -0
  44. data/spec/asciidoctor/rfc/v2/document_spec.rb +161 -0
  45. data/spec/asciidoctor/rfc/v2/example_spec.rb +50 -0
  46. data/spec/asciidoctor/rfc/v2/front_spec.rb +75 -0
  47. data/spec/asciidoctor/rfc/v2/image_spec.rb +81 -0
  48. data/spec/asciidoctor/rfc/v2/indexterm_spec.rb +66 -0
  49. data/spec/asciidoctor/rfc/v2/inline_formatting_spec.rb +177 -0
  50. data/spec/asciidoctor/rfc/v2/keyword_spec.rb +63 -0
  51. data/spec/asciidoctor/rfc/v2/listing_spec.rb +59 -0
  52. data/spec/asciidoctor/rfc/v2/literal_spec.rb +53 -0
  53. data/spec/asciidoctor/rfc/v2/olist_spec.rb +147 -0
  54. data/spec/asciidoctor/rfc/v2/paragraph_spec.rb +68 -0
  55. data/spec/asciidoctor/rfc/v2/preamble_spec.rb +140 -0
  56. data/spec/asciidoctor/rfc/v2/quote_spec.rb +24 -0
  57. data/spec/asciidoctor/rfc/v2/references_spec.rb +96 -0
  58. data/spec/asciidoctor/rfc/v2/section_spec.rb +260 -0
  59. data/spec/asciidoctor/rfc/v2/sidebar_spec.rb +32 -0
  60. data/spec/asciidoctor/rfc/v2/table_spec.rb +293 -0
  61. data/spec/asciidoctor/rfc/v2/ulist_spec.rb +96 -0
  62. data/spec/asciidoctor/rfc/v2/workgroup_spec.rb +60 -0
  63. data/spec/asciidoctor/rfc/v3/appendix_spec.rb +130 -0
  64. data/spec/asciidoctor/rfc/v3/area_spec.rb +63 -0
  65. data/spec/asciidoctor/rfc/v3/author_spec.rb +540 -0
  66. data/spec/asciidoctor/rfc/v3/comments_spec.rb +308 -0
  67. data/spec/asciidoctor/rfc/v3/crossref_spec.rb +269 -0
  68. data/spec/asciidoctor/rfc/v3/date_spec.rb +149 -0
  69. data/spec/asciidoctor/rfc/v3/dlist_spec.rb +121 -0
  70. data/spec/asciidoctor/rfc/v3/document_spec.rb +109 -0
  71. data/spec/asciidoctor/rfc/v3/example_spec.rb +34 -0
  72. data/spec/asciidoctor/rfc/v3/front_spec.rb +43 -0
  73. data/spec/asciidoctor/rfc/v3/image_spec.rb +81 -0
  74. data/spec/asciidoctor/rfc/v3/indexterm_spec.rb +69 -0
  75. data/spec/asciidoctor/rfc/v3/inline_formatting_spec.rb +319 -0
  76. data/spec/asciidoctor/rfc/v3/keyword_spec.rb +33 -0
  77. data/spec/asciidoctor/rfc/v3/link_spec.rb +34 -0
  78. data/spec/asciidoctor/rfc/v3/listing_spec.rb +59 -0
  79. data/spec/asciidoctor/rfc/v3/literal_spec.rb +51 -0
  80. data/spec/asciidoctor/rfc/v3/olist_spec.rb +168 -0
  81. data/spec/asciidoctor/rfc/v3/paragraph_spec.rb +73 -0
  82. data/spec/asciidoctor/rfc/v3/preamble_spec.rb +112 -0
  83. data/spec/asciidoctor/rfc/v3/quote_spec.rb +91 -0
  84. data/spec/asciidoctor/rfc/v3/references_spec.rb +147 -0
  85. data/spec/asciidoctor/rfc/v3/section_spec.rb +198 -0
  86. data/spec/asciidoctor/rfc/v3/series_info_spec.rb +151 -0
  87. data/spec/asciidoctor/rfc/v3/sidebar_spec.rb +30 -0
  88. data/spec/asciidoctor/rfc/v3/table_spec.rb +275 -0
  89. data/spec/asciidoctor/rfc/v3/ulist_spec.rb +74 -0
  90. data/spec/asciidoctor/rfc/v3/workgroup_spec.rb +33 -0
  91. data/spec/examples/davies-template-bare-06.adoc +361 -0
  92. data/spec/examples/davies-template-bare-06.xml.orig +426 -0
  93. data/spec/examples/example-v2.adoc +181 -0
  94. data/spec/examples/example-v2.xml +675 -0
  95. data/spec/examples/example-v3.adoc +185 -0
  96. data/spec/examples/example-v3.xml +1009 -0
  97. data/spec/examples/mib-doc-template-xml-06.adoc +596 -0
  98. data/spec/examples/mib-doc-template-xml-06.xml.orig +654 -0
  99. data/spec/examples/rfc1149.md +76 -0
  100. data/spec/examples/rfc1149.md.2.xml +94 -0
  101. data/spec/examples/rfc1149.md.3.xml +93 -0
  102. data/spec/examples/rfc1149.md.adoc +65 -0
  103. data/spec/examples/rfc2100.md +149 -0
  104. data/spec/examples/rfc2100.md.2.xml +169 -0
  105. data/spec/examples/rfc2100.md.3.xml +163 -0
  106. data/spec/examples/rfc2100.md.adoc +136 -0
  107. data/spec/examples/rfc3514.md +203 -0
  108. data/spec/examples/rfc3514.md.2.xml +238 -0
  109. data/spec/examples/rfc3514.md.3.xml +258 -0
  110. data/spec/examples/rfc3514.md.adoc +324 -0
  111. data/spec/examples/rfc5841.md +342 -0
  112. data/spec/examples/rfc5841.md.2.xml +393 -0
  113. data/spec/examples/rfc5841.md.3.xml +449 -0
  114. data/spec/examples/rfc5841.md.adoc +414 -0
  115. data/spec/examples/rfc6350.adoc +3499 -0
  116. data/spec/examples/rfc6350.bib +763 -0
  117. data/spec/examples/rfc748.md +79 -0
  118. data/spec/examples/rfc748.md.2.xml +116 -0
  119. data/spec/examples/rfc748.md.3.xml +109 -0
  120. data/spec/examples/rfc748.md.adoc +80 -0
  121. data/spec/examples/rfc7511.md +257 -0
  122. data/spec/examples/rfc7511.md.2.xml +300 -0
  123. data/spec/examples/rfc7511.md.3.xml +347 -0
  124. data/spec/examples/rfc7511.md.adoc +417 -0
  125. data/spec/spec_helper.rb +115 -5
  126. metadata +274 -9
  127. data/.hound.yml +0 -3
  128. data/README.md +0 -84
  129. data/lib/asciidoctor/rfc.rb +0 -7
  130. data/spec/asciidoctor-rfc/.keep +0 -0
@@ -0,0 +1,149 @@
1
+ require "spec_helper"
2
+ describe Asciidoctor::RFC::V3::Converter do
3
+ it "renders the date" do
4
+ expect(Asciidoctor.convert(<<~'INPUT', backend: :rfc3, header_footer: true)).to be_equivalent_to <<~'OUTPUT'
5
+ = Document title
6
+ :docName:
7
+ Author
8
+ :revdate: 2070-01-01T00:00:00Z
9
+
10
+ == Section 1
11
+ Text
12
+ INPUT
13
+ <?xml version="1.0" encoding="US-ASCII"?>
14
+ <!DOCTYPE rfc SYSTEM "rfc2629.dtd">
15
+
16
+ <rfc prepTime="2000-01-01T05:00:00Z"
17
+ version="3" submissionType="IETF">
18
+ <front>
19
+ <title>Document title</title>
20
+ <author fullname="Author">
21
+ </author>
22
+ <date day="1" month="January" year="2070"/>
23
+ </front><middle>
24
+ <section anchor="_section_1" numbered="false">
25
+ <name>Section 1</name>
26
+ <t>Text</t>
27
+ </section>
28
+ </middle>
29
+ </rfc>
30
+ OUTPUT
31
+ end
32
+ it "renders the revdate" do
33
+ expect(Asciidoctor.convert(<<~'INPUT', backend: :rfc3, header_footer: true)).to be_equivalent_to <<~'OUTPUT'
34
+ = Document title
35
+ :docName:
36
+ Author
37
+ :date: 2000-01-01T05:00:00Z
38
+
39
+ == Section 1
40
+ Text
41
+ INPUT
42
+ <?xml version="1.0" encoding="US-ASCII"?>
43
+ <!DOCTYPE rfc SYSTEM "rfc2629.dtd">
44
+
45
+ <rfc prepTime="2000-01-01T05:00:00Z"
46
+ version="3" submissionType="IETF">
47
+ <front>
48
+ <title>Document title</title>
49
+ <author fullname="Author">
50
+ </author>
51
+ <date day="1" month="January" year="2000"/>
52
+ </front><middle>
53
+ <section anchor="_section_1" numbered="false">
54
+ <name>Section 1</name>
55
+ <t>Text</t>
56
+ </section>
57
+ </middle>
58
+ </rfc>
59
+ OUTPUT
60
+ end
61
+ it "gives precedence to revdate" do
62
+ expect(Asciidoctor.convert(<<~'INPUT', backend: :rfc3, header_footer: true)).to be_equivalent_to <<~'OUTPUT'
63
+ = Document title
64
+ :docName:
65
+ Author
66
+ :revdate: 2070-01-01T00:00:00Z
67
+ :date: 2000-01-01T05:00:00Z
68
+
69
+ == Section 1
70
+ Text
71
+ INPUT
72
+ <?xml version="1.0" encoding="US-ASCII"?>
73
+ <!DOCTYPE rfc SYSTEM "rfc2629.dtd">
74
+
75
+ <rfc prepTime="2000-01-01T05:00:00Z"
76
+ version="3" submissionType="IETF">
77
+ <front>
78
+ <title>Document title</title>
79
+ <author fullname="Author">
80
+ </author>
81
+ <date day="1" month="January" year="2070"/>
82
+ </front><middle>
83
+ <section anchor="_section_1" numbered="false">
84
+ <name>Section 1</name>
85
+ <t>Text</t>
86
+ </section>
87
+ </middle>
88
+ </rfc>
89
+ OUTPUT
90
+ end
91
+ it "permits year-only revdate" do
92
+ expect(Asciidoctor.convert(<<~'INPUT', backend: :rfc3, header_footer: true)).to be_equivalent_to <<~'OUTPUT'
93
+ = Document title
94
+ :docName:
95
+ Author
96
+ :revdate: 1972
97
+
98
+ == Section 1
99
+ Text
100
+ INPUT
101
+ <?xml version="1.0" encoding="US-ASCII"?>
102
+ <!DOCTYPE rfc SYSTEM "rfc2629.dtd">
103
+
104
+ <rfc prepTime="2000-01-01T05:00:00Z"
105
+ version="3" submissionType="IETF">
106
+ <front>
107
+ <title>Document title</title>
108
+ <author fullname="Author">
109
+ </author>
110
+ <date year="1972"/>
111
+ </front><middle>
112
+ <section anchor="_section_1" numbered="false">
113
+ <name>Section 1</name>
114
+ <t>Text</t>
115
+ </section>
116
+ </middle>
117
+ </rfc>
118
+ OUTPUT
119
+ end
120
+ it "permits year-month revdate" do
121
+ expect(Asciidoctor.convert(<<~'INPUT', backend: :rfc3, header_footer: true)).to be_equivalent_to <<~'OUTPUT'
122
+ = Document title
123
+ :docName:
124
+ Author
125
+ :revdate: 1972-06
126
+
127
+ == Section 1
128
+ Text
129
+ INPUT
130
+ <?xml version="1.0" encoding="US-ASCII"?>
131
+ <!DOCTYPE rfc SYSTEM "rfc2629.dtd">
132
+
133
+ <rfc prepTime="2000-01-01T05:00:00Z"
134
+ version="3" submissionType="IETF">
135
+ <front>
136
+ <title>Document title</title>
137
+ <author fullname="Author">
138
+ </author>
139
+ <date year="1972" month="June"/>
140
+ </front><middle>
141
+ <section anchor="_section_1" numbered="false">
142
+ <name>Section 1</name>
143
+ <t>Text</t>
144
+ </section>
145
+ </middle>
146
+ </rfc>
147
+ OUTPUT
148
+ end
149
+ end
@@ -0,0 +1,121 @@
1
+ require "spec_helper"
2
+ describe Asciidoctor::RFC::V3::Converter do
3
+ it "renders a horizontal description list" do
4
+ expect(Asciidoctor.convert(<<~'INPUT', backend: :rfc3)).to be_equivalent_to <<~'OUTPUT'
5
+ [[id]]
6
+ [horizontal]
7
+ A:: B
8
+ C:: D
9
+ INPUT
10
+ <dl anchor="id" hanging="true">
11
+ <dt>A</dt>
12
+ <dd>B</dd>
13
+ <dt>C</dt>
14
+ <dd>D</dd>
15
+ </dl>
16
+ OUTPUT
17
+ end
18
+ it "renders a compact description list" do
19
+ expect(Asciidoctor.convert(<<~'INPUT', backend: :rfc3)).to be_equivalent_to <<~'OUTPUT'
20
+ [[id]]
21
+ [compact]
22
+ A:: B
23
+ C:: D
24
+ INPUT
25
+ <dl anchor="id" spacing="compact">
26
+ <dt>A</dt>
27
+ <dd>B</dd>
28
+ <dt>C</dt>
29
+ <dd>D</dd>
30
+ </dl>
31
+ OUTPUT
32
+ end
33
+ it "renders nested description list/ulist" do
34
+ expect(Asciidoctor.convert(<<~'INPUT', backend: :rfc3)).to be_equivalent_to <<~'OUTPUT'
35
+ Dairy::
36
+ * Milk
37
+ * Eggs
38
+ Bakery::
39
+ * Bread
40
+ Produce::
41
+ * Bananas
42
+ INPUT
43
+ <dl>
44
+ <dt>Dairy</dt>
45
+ <dd>
46
+ <ul>
47
+ <li>Milk</li>
48
+ <li>Eggs</li>
49
+ </ul>
50
+ </dd>
51
+ <dt>Bakery</dt>
52
+ <dd>
53
+ <ul>
54
+ <li>Bread</li>
55
+ </ul>
56
+ </dd>
57
+ <dt>Produce</dt>
58
+ <dd>
59
+ <ul>
60
+ <li>Bananas</li>
61
+ </ul>
62
+ </dd>
63
+ </dl>
64
+ OUTPUT
65
+ end
66
+ it "renders hybrid nested description list/ulist" do
67
+ expect(Asciidoctor.convert(<<~'INPUT', backend: :rfc3)).to be_equivalent_to <<~'OUTPUT'
68
+ Dairy:: That is,
69
+ * Milk
70
+ * Eggs
71
+ Bakery:: Namely,
72
+ * Bread
73
+ Produce:: Viz.,
74
+ * Bananas
75
+ INPUT
76
+ <dl>
77
+ <dt>Dairy</dt>
78
+ <dd><t>That is,</t>
79
+ <ul>
80
+ <li>Milk</li>
81
+ <li>Eggs</li>
82
+ </ul>
83
+ </dd>
84
+ <dt>Bakery</dt>
85
+ <dd><t>Namely,</t>
86
+ <ul>
87
+ <li>Bread</li>
88
+ </ul>
89
+ </dd>
90
+ <dt>Produce</dt>
91
+ <dd><t>Viz.,</t>
92
+ <ul>
93
+ <li>Bananas</li>
94
+ </ul>
95
+ </dd>
96
+ </dl>
97
+ OUTPUT
98
+ end
99
+ it "permits multi paragraph list items" do
100
+ expect(Asciidoctor.convert(<<~'INPUT', backend: :rfc3)).to be_equivalent_to <<~'OUTPUT'
101
+ = Document title
102
+ Author
103
+
104
+ == Section 1
105
+ Notes:: Note 1.
106
+ +
107
+ Note 2.
108
+ +
109
+ Note 3.
110
+ INPUT
111
+ <section anchor="_section_1" numbered="false">
112
+ <name>Section 1</name>
113
+ <dl>
114
+ <dt>Notes</dt>
115
+ <dd><t>Note 1.</t><t>Note 2.</t>
116
+ <t>Note 3.</t></dd>
117
+ </dl>
118
+ </section>
119
+ OUTPUT
120
+ end
121
+ end
@@ -0,0 +1,109 @@
1
+ require "spec_helper"
2
+ require "byebug"
3
+ describe Asciidoctor::RFC::V3::Converter do
4
+ it "renders the minimal document w/ default values" do
5
+ expect(Asciidoctor.convert(<<~'INPUT', backend: :rfc3, header_footer: true)).to be_equivalent_to <<~'OUTPUT'
6
+ = Document title
7
+ :docName:
8
+ Author
9
+
10
+ == Section 1
11
+ text
12
+ INPUT
13
+ <?xml version="1.0" encoding="US-ASCII"?>
14
+ <!DOCTYPE rfc SYSTEM "rfc2629.dtd">
15
+
16
+ <rfc prepTime="2000-01-01T05:00:00Z" version="3" submissionType="IETF">
17
+ <front>
18
+ <title>Document title</title>
19
+ <author fullname="Author">
20
+ </author>
21
+ <date day="1" month="January" year="2000"/>
22
+ </front><middle>
23
+ <section anchor="_section_1" numbered="false">
24
+ <name>Section 1</name>
25
+ <t>text</t>
26
+ </section>
27
+ </middle>
28
+ </rfc>
29
+ OUTPUT
30
+ end
31
+ it "renders all document attributes" do
32
+ expect(Asciidoctor.convert(<<~'INPUT', backend: :rfc3, header_footer: true)).to be_equivalent_to <<~'OUTPUT'
33
+ = Document title
34
+ :docName:
35
+ Author
36
+ :abbrev: abbrev
37
+ :ipr: ipr_value
38
+ :consensus: false
39
+ :obsoletes: 1, 2
40
+ :updates: 10, 11
41
+ :index-include: true
42
+ :ipr-extract: ipr_extract_value
43
+ :sort-refs: true
44
+ :sym-refs: false
45
+ :toc-include: false
46
+ :toc-depth: 2
47
+ :submission-type: IRTF
48
+
49
+ [[ipr_extract_value]]
50
+ == Section 1
51
+ text
52
+ INPUT
53
+ <?xml version="1.0" encoding="US-ASCII"?>
54
+ <!DOCTYPE rfc SYSTEM "rfc2629.dtd">
55
+
56
+ <rfc ipr="ipr_value" obsoletes="1, 2" updates="10, 11" prepTime="2000-01-01T05:00:00Z"
57
+ version="3" submissionType="IRTF" indexInclude="true" iprExtract="ipr_extract_value" sortRefs="true" symRefs="false" tocInclude="false" tocDepth="2">
58
+ <front>
59
+ <title abbrev="abbrev">Document title</title>
60
+ <author fullname="Author">
61
+ </author>
62
+ <date day="1" month="January" year="2000"/>
63
+ </front><middle>
64
+ <section anchor="ipr_extract_value" numbered="false">
65
+ <name>Section 1</name>
66
+ <t>text</t>
67
+ </section>
68
+ </middle>
69
+ </rfc>
70
+ OUTPUT
71
+ end
72
+ it "renders back matter" do
73
+ expect(Asciidoctor.convert(<<~'INPUT', backend: :rfc3, header_footer: true)).to be_equivalent_to <<~'OUTPUT'
74
+ = Document title
75
+ :docName:
76
+ Author
77
+
78
+ == Section 1
79
+ text
80
+
81
+ [appendix]
82
+ == Appendix
83
+ Lipsum.
84
+ INPUT
85
+ <?xml version="1.0" encoding="US-ASCII"?>
86
+ <!DOCTYPE rfc SYSTEM "rfc2629.dtd">
87
+
88
+ <rfc prepTime="2000-01-01T05:00:00Z"
89
+ version="3" submissionType="IETF">
90
+ <front>
91
+ <title>Document title</title>
92
+ <author fullname="Author">
93
+ </author>
94
+ <date day="1" month="January" year="2000"/>
95
+ </front><middle>
96
+ <section anchor="_section_1" numbered="false">
97
+ <name>Section 1</name>
98
+ <t>text</t>
99
+ </section>
100
+ </middle><back>
101
+ <section anchor="_appendix" numbered="false">
102
+ <name>Appendix</name>
103
+ <t>Lipsum.</t>
104
+ </section>
105
+ </back>
106
+ </rfc>
107
+ OUTPUT
108
+ end
109
+ end
@@ -0,0 +1,34 @@
1
+ require "spec_helper"
2
+ describe Asciidoctor::RFC::V3::Converter do
3
+ it "renders a minimal example" do
4
+ expect(Asciidoctor.convert(<<~'INPUT', backend: :rfc3)).to be_equivalent_to <<~'OUTPUT'
5
+ ====
6
+ Example
7
+ ====
8
+ INPUT
9
+ <figure>
10
+ <t>Example</t>
11
+ </figure>
12
+ OUTPUT
13
+ end
14
+ it "renders a maximal example" do
15
+ expect(Asciidoctor.convert(<<~'INPUT', backend: :rfc3)).to be_equivalent_to <<~'OUTPUT'
16
+ [[id]]
17
+ .Figure 1
18
+ ====
19
+ [[id2]]
20
+ .figure1.txt
21
+ ....
22
+ Figures are only permitted to contain listings (sourcecode), images (artwork), or literal (artwork)
23
+ ....
24
+ ====
25
+ INPUT
26
+ <figure anchor="id">
27
+ <name>Figure 1</name>
28
+ <artwork anchor="id2" name="figure1.txt" type="ascii-art">
29
+ Figures are only permitted to contain listings (sourcecode), images (artwork), or literal (artwork)
30
+ </artwork>
31
+ </figure>
32
+ OUTPUT
33
+ end
34
+ end
@@ -0,0 +1,43 @@
1
+ require "spec_helper"
2
+ describe Asciidoctor::RFC::V3::Converter do
3
+ it "renders series, author, date, area, workgroup, keyword in sequence" do
4
+ expect(Asciidoctor.convert(<<~'INPUT', backend: :rfc3, header_footer: true)).to be_equivalent_to <<~'OUTPUT'
5
+ = Document title
6
+ Author
7
+ :abbrev: abbrev_value
8
+ :name: rfc-1111
9
+ :revdate: 1999-01-01
10
+ :area: horticulture
11
+ :workgroup: IETF
12
+ :keyword: widgets
13
+
14
+ == Section 1
15
+ Text
16
+ INPUT
17
+ <?xml version="1.0" encoding="US-ASCII"?>
18
+ <!DOCTYPE rfc SYSTEM "rfc2629.dtd">
19
+
20
+ <rfc prepTime="2000-01-01T05:00:00Z"
21
+ version="3" submissionType="IETF">
22
+ <front>
23
+ <title abbrev="abbrev_value">Document title</title>
24
+ <seriesInfo name="RFC" stream="IETF" value="1111"/>
25
+ <author fullname="Author">
26
+ </author>
27
+ <date day="1" month="January" year="1999"/>
28
+ <area>horticulture</area>
29
+ <workgroup>IETF</workgroup>
30
+ <keyword>widgets</keyword>
31
+ </front><middle>
32
+ <section anchor="_section_1" numbered="false">
33
+
34
+ <name>Section 1</name>
35
+
36
+ <t>Text</t>
37
+
38
+ </section>
39
+ </middle>
40
+ </rfc>
41
+ OUTPUT
42
+ end
43
+ end