Sha256: 81027962646b854c0428cf8581f063bfd0cf75d85656f5fca07477c17e8b20f7

Contents?: true

Size: 1.61 KB

Versions: 8

Compression:

Stored size: 1.61 KB

Contents

require "spec_helper"
describe Asciidoctor::RFC::V2::Converter do
  it "renders keywords" do
    expect(Asciidoctor.convert(<<~'INPUT', backend: :rfc2, header_footer: true)).to be_equivalent_to <<~'OUTPUT'
      = Document title
      :docName:
      Author
      :keyword: first_keyword, second_keyword

      == Section 1
      text
    INPUT
      <?xml version="1.0" encoding="US-ASCII"?>
      <!DOCTYPE rfc SYSTEM "rfc2629.dtd">

      <rfc
               submissionType="IETF">
      <front>
      <title>Document title</title>
      <author fullname="Author"/>
      <date day="1" month="January" year="2000"/>
      <keyword>first_keyword</keyword><keyword>second_keyword</keyword>
      </front><middle>
      <section anchor="_section_1" title="Section 1">

         <t>text</t>

      </section>
      </middle>
      </rfc>
     OUTPUT
  end
  it "deals with entities in keywords" do
    expect(Asciidoctor.convert(<<~'INPUT', backend: :rfc2, header_footer: true)).to be_equivalent_to <<~'OUTPUT'
      = Document title
      :docName:
      Author
      :keyword: first_keyword & second_keyword

      == Section 1
      text
    INPUT
      <?xml version="1.0" encoding="US-ASCII"?>
      <!DOCTYPE rfc SYSTEM "rfc2629.dtd">

      <rfc
               submissionType="IETF">
      <front>
      <title>Document title</title>
      <author fullname="Author"/>
      <date day="1" month="January" year="2000"/>
      <keyword>first_keyword &amp; second_keyword</keyword>
      </front><middle>
      <section anchor="_section_1" title="Section 1">

         <t>text</t>

      </section>
      </middle>
      </rfc>
     OUTPUT
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
asciidoctor-rfc-0.9.2 spec/asciidoctor/rfc/v2/keyword_spec.rb
asciidoctor-rfc-0.9.1 spec/asciidoctor/rfc/v2/keyword_spec.rb
asciidoctor-rfc-0.9.0 spec/asciidoctor/rfc/v2/keyword_spec.rb
asciidoctor-rfc-0.8.5 spec/asciidoctor/rfc/v2/keyword_spec.rb
asciidoctor-rfc-0.8.3 spec/asciidoctor/rfc/v2/keyword_spec.rb
asciidoctor-rfc-0.8.2 spec/asciidoctor/rfc/v2/keyword_spec.rb
asciidoctor-rfc-0.8.0 spec/asciidoctor/rfc/v2/keyword_spec.rb
asciidoctor-rfc-0.2.0 spec/asciidoctor/rfc/v2/keyword_spec.rb