summaryrefslogtreecommitdiff
path: root/spec/index_spec.rb
diff options
context:
space:
mode:
authorDan Allen <dan.j.allen@gmail.com>2020-03-22 23:59:34 -0600
committerDan Allen <dan.j.allen@gmail.com>2020-03-23 00:27:51 -0600
commit43e50bb231c90d93423f5495d11c62ba8b221003 (patch)
tree5d33b4b6a7ae4600ad0b05bf0b11e4db089cdcba /spec/index_spec.rb
parent251688797553fa257939d738d11eb099f98e181b (diff)
add test case for single pagenum range and split range in index
Diffstat (limited to 'spec/index_spec.rb')
-rw-r--r--spec/index_spec.rb11
1 files changed, 7 insertions, 4 deletions
diff --git a/spec/index_spec.rb b/spec/index_spec.rb
index f1b36b33..239da73a 100644
--- a/spec/index_spec.rb
+++ b/spec/index_spec.rb
@@ -302,21 +302,24 @@ describe 'Asciidoctor::PDF::Converter - Index' do
== First Chapter
- ((coming soon))
+ ((coming soon)) ((almost here))
== Second Chapter
- ((coming soon))
+ ((coming soon)) ((in draft))
== Third Chapter
- ((coming soon))
+ ((coming soon)) ((almost here))
[index]
== Index
EOS
- (expect (pdf.lines pdf.find_text page_number: 5).join ?\n).to include 'coming soon, 1-3'
+ index_lines = pdf.lines pdf.find_text page_number: 5
+ (expect index_lines).to include 'coming soon, 1-3'
+ (expect index_lines).to include 'in draft, 2'
+ (expect index_lines).to include 'almost here, 1, 3'
end
it 'should apply hanging indent to wrapped lines equal to twice level indent' do