require "spec_helper" RSpec.describe Asciidoctor::Standoc do it "processes inline_quoted formatting" do expect(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :standoc, header_footer: true))).to be_equivalent_to <<~"OUTPUT" #{DUMBQUOTE_BLANK_HDR} _emphasis_ *strong* `monospace` "double quote" 'single quote' super^script^ sub~script~ sub~__scr__ipt~ stem:[a_90] stem:[ F Α ] [alt]#alt# [deprecated]#deprecated# [domain]#domain# [strike]#strike# [smallcap]#smallcap# [keyword]#keyword# INPUT #{BLANK_HDR} emphasis strong monospace "double quote" 'single quote' superscript subscript subscript a_90 F Α alt deprecated domain strike smallcap keyword OUTPUT end it "generates desired smart quotes for 'dd'" do expect(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :standoc, header_footer: true))).to be_equivalent_to <<~"OUTPUT" #{ASCIIDOC_BLANK_HDR} '99'. INPUT #{BLANK_HDR}

‘99’.

OUTPUT end it "processes breaks" do expect(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :standoc, header_footer: true))).to be_equivalent_to <<~"OUTPUT" #{ASCIIDOC_BLANK_HDR} Line break + line break ''' <<< INPUT #{BLANK_HDR}

Line break
line break


OUTPUT end it "processes links" do expect(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :standoc, header_footer: true))).to be_equivalent_to <<~"OUTPUT" #{ASCIIDOC_BLANK_HDR} mailto:fred@example.com http://example.com[] http://example.com[Link] INPUT #{BLANK_HDR}

mailto:fred@example.com Link

OUTPUT end it "processes bookmarks" do expect(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :standoc, header_footer: true))).to be_equivalent_to <<~"OUTPUT" #{ASCIIDOC_BLANK_HDR} Text [[bookmark]] Text INPUT #{BLANK_HDR}

Text Text

OUTPUT end it "processes crossreferences" do expect(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :standoc, header_footer: true))).to be_equivalent_to <<~"OUTPUT" #{ASCIIDOC_BLANK_HDR} [[reference]] == Section Inline Reference to <> Footnoted Reference to <> Inline Reference with Text to <> Footnoted Reference with Text to <> Anchored Crossreference to other document <> INPUT #{BLANK_HDR} Section

Inline Reference to Footnoted Reference to Inline Reference with Text to text Footnoted Reference with Text to text Anchored Crossreference to other document

OUTPUT end it "processes bibliographic anchors" do expect(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :standoc, header_footer: true))).to be_equivalent_to <<~"OUTPUT" #{ASCIIDOC_BLANK_HDR} [bibliography] == Normative References * [[[ISO712,x]]] Reference * [[[ISO713]]] Reference INPUT #{BLANK_HDR} Normative References Reference x Reference ISO713 OUTPUT end it "processes footnotes" do expect(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :standoc, header_footer: true))).to be_equivalent_to <<~"OUTPUT" #{ASCIIDOC_BLANK_HDR} Hello!footnote:[Footnote text] == Title footnote:[Footnote text 2] INPUT #{BLANK_HDR} Foreword

Hello!

Footnote text

Title<fn reference="2"> <p id="_">Footnote text 2</p> </fn> OUTPUT end end