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,59 @@
1
+ require "spec_helper"
2
+ describe Asciidoctor::RFC::V2::Converter do
3
+ it "renders a listing block with source attribute, ignoring listing content" do
4
+ expect(Asciidoctor.convert(<<~'INPUT', backend: :rfc2)).to be_equivalent_to <<~'OUTPUT'
5
+ [[literal-id]]
6
+ .filename.rb
7
+ [source,ruby,src=http://example.com/ruby.rb,alt=Alt Text]
8
+ ----
9
+ def listing(node)
10
+ result = []
11
+ result << "<figure>" if node.parent.context != :example
12
+ end
13
+ ----
14
+ INPUT
15
+ <figure>
16
+ <artwork name="filename.rb" type="ruby" src="http://example.com/ruby.rb" alt="Alt Text">
17
+ </artwork>
18
+ </figure>
19
+ OUTPUT
20
+ end
21
+
22
+ it "renders a listing block without source attribute" do
23
+ expect(Asciidoctor.convert(<<~'INPUT', backend: :rfc2)).to be_equivalent_to <<~'OUTPUT'
24
+ [[literal-id]]
25
+ .filename.rb
26
+ [source,ruby]
27
+ ----
28
+ def listing(node)
29
+ result = []
30
+ result << "<figure>" if node.parent.context != :example
31
+ end
32
+ ----
33
+ INPUT
34
+ <figure>
35
+ <artwork name="filename.rb" type="ruby">
36
+ def listing(node)
37
+ result = []
38
+ result &lt;&lt; "&lt;figure&gt;" if node.parent.context != :example
39
+ end
40
+ </artwork>
41
+ </figure>
42
+ OUTPUT
43
+ end
44
+
45
+ it "renders a listing paragraph" do
46
+ expect(Asciidoctor.convert(<<~'INPUT', backend: :rfc2)).to be_equivalent_to <<~'OUTPUT'
47
+ [listing]
48
+ This is an example of a paragraph styled with `listing`.
49
+ Notice that the monospace markup is preserved in the output.
50
+ INPUT
51
+ <figure>
52
+ <artwork>
53
+ This is an example of a paragraph styled with `listing`.
54
+ Notice that the monospace markup is preserved in the output.
55
+ </artwork>
56
+ </figure>
57
+ OUTPUT
58
+ end
59
+ end
@@ -0,0 +1,53 @@
1
+ require "spec_helper"
2
+ describe Asciidoctor::RFC::V2::Converter do
3
+ it "renders a listing" do
4
+ expect(Asciidoctor.convert(<<~'INPUT', backend: :rfc2)).to be_equivalent_to <<~'OUTPUT'
5
+ [[literal-id]]
6
+ .filename
7
+ [align=left,alt=alt_text,type=abnf]
8
+ ....
9
+ Literal contents.
10
+ ....
11
+ INPUT
12
+ <figure>
13
+ <artwork align="left" name="filename" type="abnf" alt="alt_text">
14
+ Literal contents.
15
+ </artwork>
16
+ </figure>
17
+ OUTPUT
18
+ end
19
+
20
+ it "ignores callouts" do
21
+ expect(Asciidoctor.convert(<<~'INPUT', backend: :rfc2)).to be_equivalent_to <<~'OUTPUT'
22
+ [[literal-id]]
23
+ .filename
24
+ [align=left,alt=alt_text]
25
+ ....
26
+ Literal contents.
27
+ ....
28
+ <1> This is a callout
29
+ INPUT
30
+ <figure>
31
+ <artwork align="left" name="filename" alt="alt_text">
32
+ Literal contents.
33
+ </artwork>
34
+ </figure>
35
+ OUTPUT
36
+ end
37
+
38
+ it "renders stem as a literal" do
39
+ expect(Asciidoctor.convert(<<~'INPUT', backend: :rfc2)).to be_equivalent_to <<~'OUTPUT'
40
+ :stem:
41
+ [stem]
42
+ ++++
43
+ sqrt(4) = 2
44
+ ++++
45
+ INPUT
46
+ <figure>
47
+ <artwork>
48
+ sqrt(4) = 2
49
+ </artwork>
50
+ </figure>
51
+ OUTPUT
52
+ end
53
+ end
@@ -0,0 +1,147 @@
1
+ require "spec_helper"
2
+ describe Asciidoctor::RFC::V2::Converter do
3
+ it "renders an ordered list" do
4
+ expect(Asciidoctor.convert(<<~'INPUT', backend: :rfc2)).to be_equivalent_to <<~'OUTPUT'
5
+ [[id]]
6
+ [counter=idx,arabic]
7
+ . First
8
+ . Second
9
+ INPUT
10
+ <t>
11
+ <list counter="idx" style="numbers">
12
+ <t>First</t>
13
+ <t>Second</t>
14
+ </list>
15
+ </t>
16
+ OUTPUT
17
+ end
18
+
19
+ it "ignores anchors on ordered list items" do
20
+ expect(Asciidoctor.convert(<<~'INPUT', backend: :rfc2)).to be_equivalent_to <<~'OUTPUT'
21
+ [[id]]
22
+ [counter=idx,group=5,arabic,spacing=compact]
23
+ . First
24
+ . [[id1]] Second
25
+ INPUT
26
+ <t>
27
+ <list counter="idx" style="numbers">
28
+ <t>First</t>
29
+ <t> Second</t>
30
+ </list>
31
+ </t>
32
+ OUTPUT
33
+ end
34
+
35
+ it "renders an ordered list with empty style" do
36
+ expect(Asciidoctor.convert(<<~'INPUT', backend: :rfc2)).to be_equivalent_to <<~'OUTPUT'
37
+ [empty]
38
+ . First
39
+ . Second
40
+ INPUT
41
+ <t>
42
+ <list style="empty">
43
+ <t>First</t>
44
+ <t>Second</t>
45
+ </list>
46
+ </t>
47
+ OUTPUT
48
+ end
49
+
50
+ it "renders an ordered list with custom style" do
51
+ expect(Asciidoctor.convert(<<~'INPUT', backend: :rfc2)).to be_equivalent_to <<~'OUTPUT'
52
+ [format="#%d"]
53
+ . First
54
+ . Second
55
+ INPUT
56
+ <t>
57
+ <list style="format #%d">
58
+ <t>First</t>
59
+ <t>Second</t>
60
+ </list>
61
+ </t>
62
+ OUTPUT
63
+ end
64
+
65
+ it "renders a nested ordered list" do
66
+ expect(Asciidoctor.convert(<<~'INPUT', backend: :rfc2)).to be_equivalent_to <<~'OUTPUT'
67
+ [[id]]
68
+ [loweralpha]
69
+ . First
70
+ . Second
71
+ [upperalpha]
72
+ .. Third
73
+ .. Fourth
74
+ . Fifth
75
+ . Sixth
76
+ INPUT
77
+ <t>
78
+ <list style="letters">
79
+ <t>First</t>
80
+ <t>Second
81
+ <list style="format %C.">
82
+ <t>Third</t>
83
+ <t>Fourth</t>
84
+ </list>
85
+ </t>
86
+ <t>Fifth</t>
87
+ <t>Sixth</t>
88
+ </list>
89
+ </t>
90
+ OUTPUT
91
+ end
92
+
93
+ it "renders a nested ordered/unordered list" do
94
+ expect(Asciidoctor.convert(<<~'INPUT', backend: :rfc2)).to be_equivalent_to <<~'OUTPUT'
95
+ [[id]]
96
+ [lowerroman]
97
+ . First
98
+ . Second
99
+ ** Third
100
+ ** Fourth
101
+ INPUT
102
+ <t>
103
+ <list style="format %i.">
104
+ <t>First</t>
105
+ <t>Second
106
+ <list style="symbols">
107
+ <t>Third</t>
108
+ <t>Fourth</t>
109
+ </list>
110
+ </t>
111
+ </list>
112
+ </t>
113
+ OUTPUT
114
+ end
115
+
116
+ it "renders decimal lists as arabic" do
117
+ expect(Asciidoctor.convert(<<~'INPUT', backend: :rfc2)).to be_equivalent_to <<~'OUTPUT'
118
+ [[id]]
119
+ [decimal]
120
+ . First
121
+ . Second
122
+ INPUT
123
+ <t>
124
+ <list style="numbers">
125
+ <t>First</t>
126
+ <t>Second</t>
127
+ </list>
128
+ </t>
129
+ OUTPUT
130
+ end
131
+
132
+ it "renders lowergreek lists as arabic" do
133
+ expect(Asciidoctor.convert(<<~'INPUT', backend: :rfc2)).to be_equivalent_to <<~'OUTPUT'
134
+ [[id]]
135
+ [lowergreek]
136
+ . First
137
+ . Second
138
+ INPUT
139
+ <t>
140
+ <list style="numbers">
141
+ <t>First</t>
142
+ <t>Second</t>
143
+ </list>
144
+ </t>
145
+ OUTPUT
146
+ end
147
+ end
@@ -0,0 +1,68 @@
1
+ require "spec_helper"
2
+ describe Asciidoctor::RFC::V2::Converter do
3
+ it "renders a paragraph" do
4
+ expect(Asciidoctor.convert(<<~'INPUT', backend: :rfc2)).to be_equivalent_to <<~'OUTPUT'
5
+ = Document title
6
+ :abbrev: abbrev_value
7
+ :docName:
8
+ Author
9
+
10
+ == Section 1
11
+ [[id]]
12
+ [keep-with-next=true, keep-with-previous=true, foo=bar]
13
+ Lorem ipsum.
14
+ INPUT
15
+ <section anchor="_section_1" title="Section 1">
16
+ <t anchor="id">Lorem ipsum.</t>
17
+ </section>
18
+ OUTPUT
19
+ end
20
+
21
+ it "suppresses smart apostrophes" do
22
+ expect(Asciidoctor.convert(<<~'INPUT', backend: :rfc2, header_footer: true)).to be_equivalent_to <<~'OUTPUT'
23
+ = Document title
24
+ :abbrev: abbrev_value
25
+ :smart-quotes: false
26
+ Author
27
+
28
+ == Dante's Revenge
29
+ Don't panic!
30
+ INPUT
31
+ <?xml version="1.0" encoding="US-ASCII"?>
32
+ <!DOCTYPE rfc SYSTEM "rfc2629.dtd">
33
+ <?rfc strict="yes"?>
34
+ <?rfc toc="yes"?>
35
+ <?rfc tocdepth="4"?>
36
+ <?rfc symrefs="yes"?>
37
+ <?rfc sortrefs="yes"?>
38
+ <?rfc compact="yes"?>
39
+ <?rfc subcompact="no"?>
40
+ <rfc submissionType="IETF">
41
+ <front>
42
+ <title abbrev="abbrev_value">Document title</title>
43
+ <author fullname="Author"/>
44
+ <date day="1" month="January" year="2000"/>
45
+ </front><middle>
46
+ <section anchor="_dante_s_revenge" title="Dante's Revenge">
47
+ <t>Don't panic!</t>
48
+ </section>
49
+ </rfc>
50
+ OUTPUT
51
+ end
52
+
53
+ it "allows smart apostrophes" do
54
+ expect(Asciidoctor.convert(<<~'INPUT', backend: :rfc2)).to be_equivalent_to <<~'OUTPUT'
55
+ = Document title
56
+ :abbrev: abbrev_value
57
+ :docName:
58
+ Author
59
+
60
+ == Dante's Revenge
61
+ Don't panic!
62
+ INPUT
63
+ <section anchor="_dante_s_revenge" title="Dante&#8217;s Revenge">
64
+ <t>Don&#8217;t panic!</t>
65
+ </section>
66
+ OUTPUT
67
+ end
68
+ end
@@ -0,0 +1,140 @@
1
+ require "spec_helper"
2
+ describe Asciidoctor::RFC::V2::Converter do
3
+ it "renders no abstract if preamble has no content" do
4
+ expect(Asciidoctor.convert(<<~'INPUT', backend: :rfc2, header_footer: true)).to be_equivalent_to <<~'OUTPUT'
5
+ = Document title
6
+ Author
7
+ :docName:
8
+
9
+ == Lorem
10
+ Ipsum.
11
+ INPUT
12
+ <?xml version="1.0" encoding="US-ASCII"?>
13
+ <!DOCTYPE rfc SYSTEM "rfc2629.dtd">
14
+
15
+ <rfc
16
+ submissionType="IETF">
17
+ <front>
18
+ <title>Document title</title>
19
+ <author fullname="Author"/>
20
+ <date day="1" month="January" year="2000"/>
21
+ </front><middle>
22
+ <section anchor="_lorem" title="Lorem">
23
+ <t>Ipsum.</t>
24
+ </section>
25
+ </middle>
26
+ </rfc>
27
+ OUTPUT
28
+ end
29
+
30
+ it "renders preamble contents as abstract" do
31
+ expect(Asciidoctor.convert(<<~'INPUT', backend: :rfc2, header_footer: true)).to be_equivalent_to <<~'OUTPUT'
32
+ = Document title
33
+ Author
34
+ :docName:
35
+
36
+ Preamble content.
37
+
38
+ More Preamble content.
39
+
40
+ == Lorem
41
+ Ipsum.
42
+ INPUT
43
+ <?xml version="1.0" encoding="US-ASCII"?>
44
+ <!DOCTYPE rfc SYSTEM "rfc2629.dtd">
45
+
46
+ <rfc
47
+ submissionType="IETF">
48
+ <front>
49
+ <title>Document title</title>
50
+ <author fullname="Author"/>
51
+ <date day="1" month="January" year="2000"/>
52
+ <abstract>
53
+ <t>Preamble content.</t>
54
+ <t>More Preamble content.</t>
55
+ </abstract>
56
+ </front><middle>
57
+ <section anchor="_lorem" title="Lorem">
58
+ <t>Ipsum.</t>
59
+ </section>
60
+ </middle>
61
+ </rfc>
62
+ OUTPUT
63
+ end
64
+
65
+ it "renders admonitions in preamble as notes" do
66
+ expect(Asciidoctor.convert(<<~'INPUT', backend: :rfc2, header_footer: true)).to be_equivalent_to <<~'OUTPUT'
67
+ = Document title
68
+ Author
69
+ :docName:
70
+
71
+ [NOTE]
72
+ .Title of Note
73
+ ====
74
+ This is another note.
75
+ ====
76
+
77
+ == Lorem
78
+ Ipsum.
79
+ INPUT
80
+ <?xml version="1.0" encoding="US-ASCII"?>
81
+ <!DOCTYPE rfc SYSTEM "rfc2629.dtd">
82
+
83
+ <rfc
84
+ submissionType="IETF">
85
+ <front>
86
+ <title>Document title</title>
87
+ <author fullname="Author"/>
88
+ <date day="1" month="January" year="2000"/>
89
+ <note title="Title of Note">
90
+ <t>This is another note.</t>
91
+ </note>
92
+ </front><middle>
93
+ <section anchor="_lorem" title="Lorem">
94
+ <t>Ipsum.</t>
95
+ </section>
96
+ </middle>
97
+ </rfc>
98
+ OUTPUT
99
+ end
100
+
101
+ it "supplies default titles for notes" do
102
+ expect(Asciidoctor.convert(<<~'INPUT', backend: :rfc2, header_footer: true)).to be_equivalent_to <<~'OUTPUT'
103
+ = Document title
104
+ Author
105
+ :docName:
106
+
107
+ NOTE: This is a note.
108
+
109
+ [NOTE]
110
+ ====
111
+ This is another note.
112
+ ====
113
+
114
+ == Lorem
115
+ Ipsum.
116
+ INPUT
117
+ <?xml version="1.0" encoding="US-ASCII"?>
118
+ <!DOCTYPE rfc SYSTEM "rfc2629.dtd">
119
+
120
+ <rfc
121
+ submissionType="IETF">
122
+ <front>
123
+ <title>Document title</title>
124
+ <author fullname="Author"/>
125
+ <date day="1" month="January" year="2000"/>
126
+ <note title="NOTE">
127
+ <t>This is a note.</t>
128
+ </note>
129
+ <note title="NOTE">
130
+ <t>This is another note.</t>
131
+ </note>
132
+ </front><middle>
133
+ <section anchor="_lorem" title="Lorem">
134
+ <t>Ipsum.</t>
135
+ </section>
136
+ </middle>
137
+ </rfc>
138
+ OUTPUT
139
+ end
140
+ end