From acfe3f6b3d4a6f4b121ca3230ded78aca5e9df32 Mon Sep 17 00:00:00 2001 From: Fintan Bolton Date: Wed, 4 Jan 2017 12:28:38 +0100 Subject: [PATCH] issue-16 Added test for procedure and procedure nested inside itemizedlist --- spec/lib/docbookrx/docbookrx_spec.rb | 70 ++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) diff --git a/spec/lib/docbookrx/docbookrx_spec.rb b/spec/lib/docbookrx/docbookrx_spec.rb index 76ce10a..70345f2 100644 --- a/spec/lib/docbookrx/docbookrx_spec.rb +++ b/spec/lib/docbookrx/docbookrx_spec.rb @@ -649,6 +649,76 @@ expect(output).to include(expected) end + it 'should convert itemizedlist nested inside procedure, and procedure nested inside itemizedlist correctly' do + input = <<-EOS +
+ + + simple + + + procedure inside listitem + + + first step + + + second step + + + + + break! + + + first step + + + second step + + + third step is a nested itemizedlist + + + foo + + + bar + + + + + fourth step + + +
+ EOS + + expected = <<-EOS +* simple +* procedure inside listitem + +.. first step +.. second step + + +break! + + +. first step +. second step +. third step is a nested itemizedlist +** foo +** bar +. fourth step + EOS + output = Docbookrx.convert input + + expect(output).to include(expected) + end + it 'should add all table lines and escape | characters in table text' do input = <<-EOS