summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Allen <dan.j.allen@gmail.com>2019-05-29 00:06:13 -0600
committerDan Allen <dan.j.allen@gmail.com>2019-05-29 00:06:13 -0600
commit98d571f02aaee5b279d325a9885289cdd56300b4 (patch)
tree79224e347bd4eb38d12e21621c1faf52575f2bae
parentf845832112e7382d82a0ee5425d1bc42ca9bfffa (diff)
verify start attribute on ordered list is honored
-rw-r--r--spec/list_spec.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/spec/list_spec.rb b/spec/list_spec.rb
index 03fd7273..7255e472 100644
--- a/spec/list_spec.rb
+++ b/spec/list_spec.rb
@@ -103,6 +103,21 @@ describe 'Asciidoctor::PDF::Converter - List' do
(expect no9_text[:x]).to be > no10_text[:x]
end
+ it 'should start numbering at value of start attribute if specified' do
+ pdf = to_pdf <<~'EOS', analyze: true
+ [start=9]
+ . nine
+ . ten
+ EOS
+
+ no1_text = (pdf.find_text string: '1.')[0]
+ (expect no1_text).to be_nil
+ no9_text = (pdf.find_text string: '9.')[0]
+ (expect no9_text).not_to be_nil
+ (expect no9_text[:order]).to eql 1
+ (expect pdf.lines).to eql %w(9.nine 10.ten)
+ end
+
it 'should make numbers invisible if list has unnumbered style' do
pdf = to_pdf <<~'EOS', analyze: true
reference